@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap');

:root {
    --fp-pink: #e21b70;
    --fp-pink-light: #fce4ec;
    --fp-pink-dark: #c2185b;
    --fp-text: #1a1a1a;
    --fp-gray: #666;
    --fp-border: #f0f0f0;
    --fp-font: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--fp-font);
}

/* --- 1. WRAPPER (NORMAL PAGE SCROLL) --- */
.fp-wrapper {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
    height: auto;
    overflow: visible;
    transform: none !important;
}

/* --- 2. CATEGORIES (STICKY) --- */
.fp-categories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 15px 0;
    margin-bottom: 20px;

    position: -webkit-sticky;
    position: sticky;
    top: 90px; /* Header ke neeche */
    background-color: #fff;
    z-index: 100;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.fp-cat-btn {
    padding: 10px 24px;
    border-radius: 30px;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    font-weight: 700;
    white-space: nowrap;
    transition: 0.3s;
    font-family: var(--fp-font);
}

.fp-cat-btn.active {
    background: var(--fp-pink);
    color: #fff;
    border-color: var(--fp-pink);
}

/* --- Order Toggle --- */
.fp-order-toggle {
    display: flex;
    background: #eee;
    padding: 5px;
    border-radius: 40px;
    width: fit-content;
    margin-bottom: 15px;
    z-index: 101;
}

.fp-toggle-btn {
    border: none;
    padding: 10px 30px;
    border-radius: 35px;
    cursor: pointer;
    font-weight: 700;
    background: transparent;
    transition: 0.3s;
    font-family: var(--fp-font);
}

.fp-toggle-btn.active {
    background: #fff;
    color: var(--fp-pink);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* --- 3. MAIN GRID LAYOUT --- */
.fp-main {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    align-items: start;
}

/* --- 4. PRODUCTS AREA --- */
.fp-products-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.fp-product-card {
    display: flex;
    justify-content: space-between;
    background: #fff;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--fp-border);
    cursor: pointer;
    transition: 0.3s;
    position: relative;
}

.fp-product-card:hover {
    transform: translateY(-4px);
    border-color: var(--fp-pink);
}

.fp-left h4 {
    margin: 0 0 5px;
    font-size: 18px;
    font-weight: 800;
}

.fp-price {
    color: var(--fp-pink);
    font-weight: 800;
    display: block;
    margin-bottom: 5px;
}

.fp-variation-badge {
    display: inline-block;
    background: var(--fp-pink-light);
    color: var(--fp-pink);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.fp-img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 12px;
}

.fp-add-trigger {
    position: absolute;
    bottom: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 22px;
    color: var(--fp-pink);
    cursor: pointer;
}

/* --- 5. RIGHT SIDEBAR (STICKY) --- */
.fp-cart-sidebar {
    background: #fff;
    padding: 25px;
    border-radius: 18px;
    border: 1px solid var(--fp-border);
    
    position: -webkit-sticky;
    position: sticky;
    top: 300px;
    
    max-height: 90vh;
    overflow-y: auto;
}

.fp-cart-header h3 {
    margin: 0 0 20px;
    font-size: 22px;
    font-weight: 800;
}

.fp-cart-item {
    display: flex;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    align-items: center;
}

.fp-cart-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 8px;
}

.fp-cart-info {
    flex: 1;
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    align-items: center;
}

.fp-cart-name {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    max-width: 200px;
}

.fp-cart-price {
    color: var(--fp-pink);
    font-weight: 700;
    white-space: nowrap;
}

.empty-cart-msg {
    text-align: center;
    padding: 40px;
    color: #999;
}

.fp-flex-row {
    display: flex;
    justify-content: space-between;
    margin: 25px 0;
    font-weight: 800;
    font-size: 18px;
}

.fp-btn-primary {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    background: var(--fp-pink);
    color: #fff;
    padding: 15px;
    text-align: center;
    border-radius: 12px;
    border: none;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
    text-decoration: none;
    font-size: 16px;
    font-family: var(--fp-font);
}

.fp-btn-primary:hover {
    transform: translateY(-2px);
    background: var(--fp-pink-dark);
}

.fp-btn-primary.fp-loading {
    opacity: 0.6;
    pointer-events: none;
}

.fp-remove-item {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    transition: 0.2s;
}

.fp-remove-item:hover {
    color: #e21b70;
}

.fp-remove-item.fp-loading {
    opacity: 0.5;
    pointer-events: none;
}

/* --- Modal Styles --- */
.fp-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.fp-modal-container {
    background: #fff;
    width: 420px;
    max-width: 95%;
    max-height: 85vh;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
}

.fp-modal-scroll-body {
    overflow-y: auto;
    flex: 1;
}

.fp-modal-hero-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: 0.3s;
}

.fp-modal-content-padding {
    padding: 20px;
}

h2.fp-modal-title {
    font-size: 25px;
    margin: 0 0 10px 0;
}

.fp-modal-description {
    color: var(--fp-gray);
    font-size: 14px;
    margin: 0 0 20px 0;
    line-height: 1.5;
}

.fp-section-title {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 15px 0;
    color: var(--fp-text);
    position: relative;
    padding-bottom: 10px;
}

.fp-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--fp-pink);
    border-radius: 2px;
}

/* Variations Dropdown */
.fp-modal-variations {
    margin-bottom: 20px;
}

.fp-variation-select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    font-family: var(--fp-font);
    color: var(--fp-text);
    background-color: #fff;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    transition: 0.3s;
}

.fp-variation-select:focus {
    outline: none;
    border-color: var(--fp-pink);
    box-shadow: 0 0 0 3px var(--fp-pink-light);
}

/* Addons */
.fp-modal-addons {
    margin-top: 20px;
}

.fp-addon-label {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 15px;
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 10px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 14px;
    font-weight: 600;
}

.fp-addon-label:hover {
    border-color: var(--fp-pink);
    background: #fff;
}

.fp-addon-label input[type="checkbox"] {
    display: none;
}

.fp-addon-custom-check {
    width: 22px;
    height: 22px;
    border: 2px solid #ddd;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    flex-shrink: 0;
}

.fp-addon-label input:checked + .fp-addon-custom-check {
    background: var(--fp-pink);
    border-color: var(--fp-pink);
}

.fp-addon-label input:checked + .fp-addon-custom-check::after {
    content: '✓';
    color: #fff;
    font-size: 14px;
    font-weight: 700;
}

.fp-addon-price {
    margin-left: auto;
    color: var(--fp-pink);
    font-weight: 700;
}

.fp-modal-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--fp-pink);
    margin: 20px 0;
    padding: 15px;
    background: var(--fp-pink-light);
    border-radius: 12px;
    text-align: center;
}

.fp-qty-selector {
    display: flex;
    gap: 10px;
    align-items: center;
    font-weight: 200;
}

.qty-minus, .qty-plus {
    border: none;
    background: #eee;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
}

.qty-value {
    font-size: 18px;
    font-weight: 700;
    min-width: 30px;
    text-align: center;
}

.fp-modal-footer {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-top: 1px solid #eee;
}

.fp-modal-footer .fp-btn-primary {
    flex: 1;
}

/* Location Box */
.fp-location-section {
    background: #fff;
    border: 1px solid #eee;
    padding: 15px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
}

#fp-address-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-bottom: 10px;
    font-size: 14px;
    font-family: var(--fp-font);
}

#fp-address-input:focus {
    outline: none;
    border-color: var(--fp-pink);
}

.fp-loc-btn, .fp-loc-btn-alt {
    width: 100%;
    border: none;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 5px;
    transition: 0.3s;
    font-family: var(--fp-font);
}

.fp-loc-btn {
    background: var(--fp-pink);
    color: #fff;
}

.fp-loc-btn:hover {
    background: var(--fp-pink-dark);
}

.fp-loc-btn-alt {
    background: #f0f0f0;
    color: #333;
}

#fp-loc-status {
    color: #4CAF50;
    font-size: 13px;
    margin-top: 5px;
    font-weight: 600;
}

/* ==========================
   MOBILE RESPONSIVE STYLES
   ========================== */

@media(max-width:850px) {
    .fp-main {
        grid-template-columns: 1fr; /* Stack Grid */
    }

    /* Remove Sticky behavior on mobile for better scroll */
    .fp-categories, .fp-cart-sidebar {
        position: static;
    }
    
    .fp-products-scroll {
        height: auto;
        grid-template-columns: 1fr; /* 1 item per row */
    }

    /* Show sidebar below products instead of hiding it */
    .fp-cart-sidebar {
        display: block;
        margin-top: 30px;
        max-height: none;
        overflow: visible;
    }
}

@media(max-width:480px) {
    /* Stack Product Card Layout on very small screens */
    .fp-product-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .fp-right {
        margin-top: 15px;
        position: static;
    }
    
    .fp-add-trigger {
        position: static;
        margin-top: 10px;
        width: 100%;
        border-radius: 12px;
    }

    /* Modal Adjustments */
    .fp-modal-footer {
        flex-direction: column;
    }
    .fp-modal-footer .fp-btn-primary {
        width: 100%;
    }
}