body, html {
    color: #555;
}

.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.product-card {
    background: #0000000a;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    position: relative;
}

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

.product-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.product-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255,255,255,0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.product-card:hover .product-image::before {
    transform: translateX(100%);
}

.product-info {
    padding: 10px;
}

.product-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #333;
    line-height: 1.3;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px;
    transform: translateY(100%);
    transition: transform 0.3s;
    opacity: 0;
    visibility: hidden;
}

.product-card:hover .product-title {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.product-actions {
    display: flex;
    gap: 5px;
    margin-top: 5px;
    align-items: center;
    justify-content: space-between;
}

.product-price {
    font-size: 16px;
    font-weight: bold;
    color: #3ac3d6 !important;
    margin: 0;
    flex: 1;
    text-align: center;
}

.btn-cart, .btn-info, .modal-cart-btn, .btn-primary, button, input[type="submit"] {
    color: #000 !important;
    background-color: #d3f4f3 !important;
    border: 1px solid #00a9ae !important;
    box-shadow: none !important;
}

.btn-cart, .btn-info {
    border-radius: 2px !important;
    border-width: 1.5px !important;
    border-style: solid !important;
    border-color: #5ed0e0 !important; /* lighter than #00a9ae */
    color: #000 !important;
    background-color: #d3f4f3 !important;
    box-shadow: none !important;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-cart:hover, .btn-info:hover, .modal-cart-btn:hover, .btn-primary:hover, button:hover, input[type="submit"]:hover {
    background-color: #b2e9e7 !important;
    border-color: #00a9ae !important;
}

.icon-cart::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    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="M7 18c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zM1 2v2h2l3.6 7.59-1.35 2.45c-.16.28-.25.61-.25.96 0 1.1.9 2 2 2h12v-2H7.42c-.14 0-.25-.11-.25-.25l.03-.12L8.1 13h7.45c.75 0 1.41-.41 1.75-1.03L21.7 4H5.21l-.94-2H1zm16 16c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.icon-info::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    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 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.icon-close::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    vertical-align: middle;
}

.icon-check::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="green"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
    vertical-align: text-top;
}

.icon-warning::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="orange"><path d="M1 21h22L12 2 1 21zm12-3h-2v-2h2v2zm0-4h-2v-4h2v4z"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    margin-right: 6px;
    vertical-align: text-top;
}

/* Fallback for when SVG doesn't load - use simple CSS shapes */
@supports not (background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d=""/></svg>')) {
    .icon-cart::before { content: '🛒'; background: none; }
    .icon-info::before { content: 'ℹ️'; background: none; }
    .icon-close::before { content: '✕'; background: none; }
    .icon-check::before { content: '✓'; background: none; }
    .icon-warning::before { content: '⚠'; background: none; }
}

.icon-cart,
.icon-info,
.icon-close,
.icon-check,
.icon-warning {
    color: #5ed0e0;
}

.icon-cart::before,
.icon-info::before,
.icon-close::before,
.icon-check::before,
.icon-warning::before {
    color: #5ed0e0;
}
.btn-info:hover {
    background: #2980b9;
}

/* Product Modal */
.product-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 0;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow-y: auto;
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 30px;
    cursor: pointer;
    color: #999;
   background: #fff;
    /* clip-path: path('M 0 0 C 10 0 0 20 10 20 L 20 20 C 40 20 40 20 40 40, 0 Q40, 0 0 '); */
    /* clip-path: path('M0,0 Q10,0 10,10 Q10,30 30,30 Q60,30 40,10 Q40,0 40,0 Q10,0 0,0 Z'); */
    /*clip-path: path('M0,0 Q10,0 10,10 Q10,30 10,30 Q60, 30 40,10 Q40,0 40,0 Q10,0 0,0 Z'); */
    border-bottom-left-radius: 10px;;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}


.modal-close:hover {
    color: #333;
}

.modal-close.icon-close::before {
    width: 20px;
    height: 20px;
    margin: 0;
}

.modal-body {
    padding: 20px;
}

.modal-gallery {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.main-image {
    flex: 2;
}

.main-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.thumbnail-gallery {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-item {
    width: 80px;
    height: 80px;
    background-size: cover;
    background-position: center;
    border-radius: 5px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.thumb-item:hover, .thumb-item.active {
    border-color: #3498db;
}

.modal-info h3 {
    margin: 0 0 15px 0;
    color: #333;
}

.modal-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.modal-price {
    font-size: 28px;
    font-weight: bold;
    color: #3ac3d6 !important;
    margin: 15px 0;
}

.modal-cart-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 10px;
    border-radius: 5px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    width: 30%;
}

.modal-cart-btn:hover {
    background: #219a52;
}

.stock-info {
    margin: 10px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 5px;
    font-size: 14px;
    color: #666;
}

.stock-info.in-stock {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.stock-info.low-stock {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.stock-info.out-of-stock {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.sold-out-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    right: auto;
    bottom: auto;
    background: rgba(231, 76, 60, 0.7); /* more subtle */
    color: #fff;
    padding: 2px 10px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
    pointer-events: none;
}

.product-card.out-of-stock {
    opacity: 0.7;
}

.product-card.out-of-stock .product-image {
    filter: grayscale(50%);
}

/* Cart message styles */
.cart-message-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cart-message-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.btn-primary {
    background: #007bff;
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background: #0056b3;
    text-decoration: none;
    color: white;
}

.category-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 30px 0 20px 0;
}
.category-separator-line {
    flex: 1;
    height: 1px;
    background: #000;
    margin: 0 16px;
}
.category-separator-title {
    font-size: 1.5em;
    font-weight: bold;
    text-align: center;
    background: #fff;
    padding: 0 10px;
    z-index: 1;
}

@media (max-width: 768px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 8px;
        padding: 10px 0;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-info {
        padding: 8px;
    }
    
    .product-price {
        font-size: 14px;
    }
    
    .btn-cart, .btn-info {
        width: 28px;
        height: 28px;
        padding: 6px;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-gallery {
        flex-direction: column;
    }
    
    .thumbnail-gallery {
        flex-direction: row;
        overflow-x: auto;
        gap: 8px;
        padding: 10px 0;
    }
    
    .thumb-item {
        min-width: 60px;
        height: 45px;
        flex-shrink: 0;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .product-title {
        font-size: 12px;
        padding: 3px;
    }
}

@media (max-width: 480px) {
    .shop-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 6px;
    }
    
    .product-image {
        height: 120px;
    }
    
    .product-info {
        padding: 6px;
    }
    
    .product-price {
        font-size: 12px;
    }
    
    .btn-cart, .btn-info {
        width: 24px;
        height: 24px;
        padding: 4px;
    }
    
    .modal-content {
        margin: 1% auto;
        width: 98%;
        max-height: 98vh;
    }
    
    .thumb-item {
        min-width: 50px;
        height: 38px;
    }
}

/* === ICON COLOR OVERLAY FIX === */
/* All icon- classes use SVGs with fill=white or fill=currentColor. To color them, use filter for white SVGs, or color for currentColor SVGs. */

/* For SVGs with fill=white (as in icon-info, icon-cart, etc): */
.icon-cart::before,
.icon-info::before,
.icon-close::before,
.icon-check::before,
.icon-warning::before {
    

    /* This filter turns white SVGs into #5ed0e0
        filter: none !important; 
        color: #5ed0e0 !important;
    */
    /* filter: invert(77%) sepia(61%) saturate(322%) hue-rotate(142deg) brightness(97%) contrast(92%); */
    filter: invert(42%) sepia(51%) saturate(322%) hue-rotate(142deg) brightness(99%) contrast(99%);
}

/* For emoji or fallback font icons, use color: */
.icon-cart,
.icon-info,
.icon-close,
.icon-check,
.icon-warning {
    color: #5ed0e0 !important;
}

/* If you want to force all icons to a certain size: */
.icon-cart::before,
.icon-info::before,
.icon-close::before,
.icon-check::before,
.icon-warning::before {
    width: 20px;
    height: 20px;
}