* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #10b6d0 0%, #0091ff 100%);
    min-height: 100vh;
    color: #333333;
    line-height: 1.4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
}

.header {
    text-align: center;
    margin-bottom: 16px;
    background: #ffffff;
    color: #2c3e50;
    padding: 16px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.header h1 {
    font-size: 2em;
    color: #2c3e50;
    margin-bottom: 16px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.search-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

#search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    background: #f8f9fa;
    transition: all 0.3s ease;
    outline: none;
}

#search-input:focus {
    border-color: #3498db;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

#clear-search {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 16px;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    display: none;
    transition: color 0.3s ease;
}

#clear-search:hover {
    color: #e74c3c;
}

#clear-search.show {
    display: block;
}

/* Order Banner Styles */
.order-banner {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: white;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    animation: slideDown 0.5s ease-out;
}

.banner-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

#banner-text {
    font-weight: 600;
    font-size: 1.1em;
}

#view-products {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

#view-products:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.category-section {
    background: #ffffff;
    color: #333333;
    margin-bottom: 25px;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    animation: fadeIn 0.6s ease-out forwards;
    border: 1px solid #e9ecef;
}

.category-section:hover {
    transform: translateY(-3px);
}

.category-title {
    font-size: 1.6em;
    color: #2c3e50;
    background: transparent;
    margin-bottom: 20px;
    text-align: center;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.category-title:hover {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

.collapse-icon {
    font-size: 0.6em;
    color: #666;
    transition: transform 0.3s ease;
    position: absolute;
    right: 8px;
}

.category-content {
    transition: all 0.3s ease;
}

.category-section.collapsed {
    margin-bottom: 15px;
}

.category-section.collapsed .category-title {
    margin-bottom: 0;
    border-bottom: 1px solid #e9ecef;
}

.subcategory {
    margin-bottom: 20px;
}

.subcategory-title {
    font-size: 1.1em;
    color: #34495e;
    background: rgba(52, 152, 219, 0.1);
    margin-bottom: 12px;
    padding: 8px 12px;
    border-left: 3px solid #3498db;
    border-radius: 4px;
    font-weight: 600;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.product-card {
    background: #ffffff;
    color: #333333;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3498db;
}

.product-image {
    width: 100%;
    height: 100px;
    object-fit: cover;
    transition: transform 0.3s ease;
    aspect-ratio: 1/1;
    background: #f8f9fa;
}

.product-card:hover .product-image {
    transform: scale(1.03);
}

.product-info {
    padding: 6px;
    background: #ffffff;
}

.product-name {
    font-size: 0.75em;
    font-weight: 600;
    color: #2c3e50;
    background: transparent;
    margin-bottom: 2px;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.product-price {
    font-size: 0.7em;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 8px;
    display: inline-block;
}

.footer {
    text-align: center;
    margin-top: 30px;
    padding: 15px;
    background: #ffffff;
    color: #6c757d;
    border-radius: 12px;
    font-size: 0.9em;
    border: 1px solid #e9ecef;
}

/* Variant Pills Styles */
.variant-pill {
    display: inline-block;
    padding: 8px 12px;
    background: rgba(231, 76, 60, 0.1);
    color: #e74c3c;
    font-weight: 700;
    font-size: 0.9em;
    border-radius: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.variant-pill:hover {
    background: rgba(231, 76, 60, 0.15);
    /*transform: translateY(-1px);*/
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.2);
}

/* Selected variant pill styles */
.variant-pill.selected {
    background: #e74c3c !important;
    color: white !important;
    border-color: #e74c3c !important;
    box-shadow: 0 3px 12px rgba(231, 76, 60, 0.3);
}

.variant-pill.selected:hover {
    background: #c0392b !important;
    /*transform: translateY(-2px);*/
    box-shadow: 0 4px 16px rgba(192, 57, 43, 0.4);
}

/* Quantity Counter — shared base styles */
.qty-btn {
    background: #27ae60;
    color: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    font-size: 1.2em;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.1s ease;
    line-height: 1;
    padding: 0;
}

.qty-btn:hover {
    background: #219a52;
    transform: scale(1.1);
}

.qty-btn:active {
    transform: scale(0.95);
}

.qty-value {
    font-size: 1.1em;
    font-weight: 700;
    color: #2c3e50;
    min-width: 28px;
    text-align: center;
}

/* Counter in the product modal (bottom-right, replaces Add button) */
.modal-qty-counter {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fa;
    border: 2px solid #27ae60;
    border-radius: 10px;
    padding: 6px 10px;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.2);
    z-index: 1001;
}

/* Counter in the order list modal */
.order-qty-counter {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #f8f9fa;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    padding: 4px 8px;
}

.order-qty-counter .qty-btn {
    width: 26px;
    height: 26px;
    font-size: 1em;
    border-radius: 5px;
}

.order-qty-counter .qty-value {
    font-size: 1em;
    min-width: 22px;
}

@media (max-width: 480px) {
    .modal-qty-counter {
        padding: 3px 5px;
        gap: 0px;
        border-radius: 9px
    }

    .qty-btn {
        width: 24px;
        height: 24px;
        font-size: 1em;
    }
    .qty-value {
        font-size: 1em;
        font-weight: 600;
        margin: 0px 3px
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: #ffffff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 15px;
    max-width: 500px;
    width: 90%;
    min-height: 450px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease-out;
    text-align: center;
}

.close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal-image {
    width: 320px;
    height: 320px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.modal-info {
    text-align: center;
    margin-bottom: 40px;
}

.modal-name {
    font-size: 1.5em;
    color: #2c3e50;
    margin-bottom: 10px;
    font-weight: 600;
}

.modal-price {
    font-size: 1.2em;
    color: #e74c3c;
    font-weight: 700;
    background: rgba(231, 76, 60, 0.1);
    padding: 8px 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 20px;
}

.share-product-btn {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: #3498db;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
    z-index: 1001;
}

.share-product-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.share-product-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: #27ae60;
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    z-index: 1001;
}

.add-to-cart-btn:hover {
    background: #219a52;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

.add-to-cart-btn:active {
    transform: translateY(0);
}

.add-to-cart-btn.added {
    background: #95a5a6;
    cursor: not-allowed;
}

.add-to-cart-btn.added:hover {
    background: #95a5a6;
    transform: none;
}

/* Order Modal Styles */
.order-modal-content {
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Add line below order modal heading */
.order-modal-content h2 {
    padding-bottom: 15px;
    margin-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.order-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    min-height: 200px;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    transition: background-color 0.3s ease;
}

.order-item:hover {
    background: #f8f9fa;
}

.order-item:last-child {
    border-bottom: none;
}

.order-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.order-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
}

.order-item-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2px;
}

.remove-order-item {
    background: none;
    color: #e74c3c;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 24px;
    font-weight: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.remove-order-item:hover {
    background: rgba(231, 76, 60, 0.1);
    color: #c0392b;
}

/* Order Total Section Styles */
.order-total-section {
    padding: 15px 0;
    border-top: 2px solid #e9ecef;
    margin-bottom: 10px;
}

.total-amount {
    text-align: center;
    font-size: 1.3em;
    color: #2c3e50;
    font-weight: 600;
}

.order-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.whatsapp-btn {
    background: #25d366;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.whatsapp-btn:hover {
    background: #128c7e;
    transform: translateY(-2px);
}

.whatsapp-btn:before {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M12.04 2c-5.46 0-9.91 4.45-9.91 9.91 0 1.75.46 3.49 1.32 5.01L2.05 22l5.25-1.38c1.45.79 3.08 1.21 4.74 1.21 5.46 0 9.91-4.45 9.91-9.91S17.5 2 12.04 2m.01 1.67c4.62 0 8.24 3.62 8.24 8.24 0 4.62-3.62 8.24-8.24 8.24-1.37 0-2.72-.33-3.91-.97l-.46-.24-3.15.83.85-3.08-.26-.48c-.64-1.15-.98-2.47-.98-3.85 0-4.62 3.62-8.24 8.24-8.24M8.53 7.33c-.16 0-.43.06-.66.31-.22.25-.87.85-.87 2.07 0 1.22.89 2.39 1.01 2.56.12.16 1.71 2.91 4.24 3.89 2.05.79 2.53.63 2.99.59.46-.04 1.48-.6 1.69-1.18.21-.58.21-1.07.15-1.18-.07-.1-.23-.16-.48-.27-.25-.14-1.47-.74-1.69-.82-.23-.08-.39-.12-.56.12-.17.25-.64.82-.78.99-.14.17-.29.19-.54.06-.25-.12-1.05-.39-1.99-1.24-.74-.66-1.23-1.47-1.38-1.72-.14-.25-.02-.38.11-.51.11-.11.25-.29.37-.43.12-.14.16-.25.25-.41.09-.17.04-.31-.02-.43-.06-.11-.56-1.35-.77-1.84-.2-.48-.4-.42-.56-.43-.14-.01-.3-.01-.46-.01z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.copy-btn {
    background: #6c757d;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.copy-btn:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.copy-btn:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 8px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white"><path d="M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.clear-btn {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.clear-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* Order Modal Responsive */
@media (max-width: 768px) {
    .order-banner {
        padding: 10px 15px;
        margin-bottom: 15px;
    }

    .banner-content {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }

    #banner-text {
        font-size: 1em;
    }

    #view-products {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .order-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 15px;
    }

    .order-item {
        padding: 10px;
    }

    .order-item img {
        width: 40px;
        height: 40px;
    }

    .order-actions {
        flex-direction: column;
    }

    .whatsapp-btn,
    .copy-btn,
    .clear-btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .total-amount {
        font-size: 1.1em;
    }

    /* Responsive variant pills */
    .variant-pill {
        font-size: 0.8em;
        padding: 6px 10px;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 6px;
    }

    .header h1 {
        font-size: 1.8em;
    }

    .category-title {
        font-size: 1.4em;
    }

    .subcategory-title {
        font-size: 1em;
    }

    .product-card {
        border-radius: 6px;
    }

    .product-image {
        height: 80px;
    }

    .product-info {
        padding: 5px;
    }

    .modal-content {
        width: 95%;
        margin: 15% auto;
        padding: 15px;
        min-height: 400px;
    }

    .modal-image {
        width: 280px;
        height: 280px;
    }

    .modal-name {
        font-size: 1.3em;
    }

    .modal-price {
        font-size: 1.1em;
    }

    .add-to-cart-btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    .share-product-btn {
        padding: 10px 20px;
        font-size: 1em;
    }

    /* Responsive variant pills for tablets */
    .variant-pill {
        font-size: 0.85em;
        padding: 7px 11px;
    }

    .variants-list {
        gap: 6px !important;
    }
}

@media (max-width: 480px) {
    .product-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 5px;
    }

    .product-image {
        height: 70px;
    }

    .product-name {
        font-size: 0.7em;
    }

    .product-price {
        font-size: 0.65em;
        padding: 1px 4px;
    }

    .modal-content {
        width: 95%;
        margin: 20% auto;
        padding: 15px;
        min-height: 350px;
    }

    .modal-image {
        width: 240px;
        height: 240px;
    }

    .modal-name {
        font-size: 1.2em;
    }

    .modal-price {
        font-size: 1em;
        padding: 6px 12px;
    }

    .add-to-cart-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    .share-product-btn {
        padding: 8px 16px;
        font-size: 0.9em;
    }

    /* Responsive variant pills for mobile */
    .variant-pill {
        font-size: 0.75em;
        padding: 5px 8px;
        border-radius: 12px;
    }

    .variants-list {
        gap: 4px !important;
    }

    .modal-variants {
        margin: 12px 0 !important;
    }

    .total-amount {
        font-size: 1em;
    }
}