/* style.css - Gothic, Witchy & Ethereal Theme for Raven Jewelry */

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

body {
    background: radial-gradient(circle at 10% 20%, #251a31 0%, #030106 100%);
    font-family: 'Inter', sans-serif;
    color: #ece4e4;
    line-height: 1.5;
    scroll-behavior: smooth;
    min-height: 100vh;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #1e1824;
}
::-webkit-scrollbar-thumb {
    background: #7a4c8c;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9b6bb9;
}

/* Typography */
h1, h2, h3, .logo-text, .category-title, .price {
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 1px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1rem 2rem;
    position: relative;
    z-index: 2;
}

/* Top Bar */
.top-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(106, 62, 126, 0.4);
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    gap: 1.2rem;
}

.lang-social {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.language-selector {
    background: rgba(0,0,0,0.5);
    padding: 0.3rem 1rem;
    border-radius: 40px;
    border: 1px solid #6a3e7e;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.language-selector:hover {
    background: #3c2a44;
    border-color: #b77ed9;
    box-shadow: 0 0 8px rgba(183, 126, 217, 0.3);
}

.social-icons a {
    color: #cfb3e6;
    font-size: 1.3rem;
    margin-left: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}
.social-icons a:hover {
    color: #e9b3ff;
    text-shadow: 0 0 5px #b77ed9;
    transform: translateY(-2px);
}

.contact-number {
    background: rgba(33, 20, 45, 0.7);
    padding: 0.4rem 1.2rem;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    backdrop-filter: blur(3px);
    border-left: 3px solid #b77ed9;
    cursor: pointer;
    transition: all 0.3s ease;
}
.contact-number:hover {
    background: rgba(59, 38, 82, 0.8);
    border-left-color: #e9b3ff;
    transform: scale(1.02);
}
.contact-number i {
    margin-right: 8px;
    color: #bd8fd9;
}

/* Cart Icon */
.cart-icon-wrapper {
    position: relative;
    cursor: pointer;
}
.cart-icon {
    font-size: 1.6rem;
    color: #cfb3e6;
    transition: 0.2s;
    position: relative;
}
.cart-icon:hover {
    color: #e9b3ff;
    transform: scale(1.05);
}
.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background: #b77ed9;
    color: #0a0510;
    font-size: 0.7rem;
    font-weight: bold;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Brand Section – FORCED VERTICAL STACK (tall pill shape) + LEFT‑ALIGNED */
.brand-section {
    display: flex;
    flex-direction: column;      /* stacks logo, text, search vertically */
    align-items: flex-start;     /* left‑align all children */
    gap: 1rem;
    margin-bottom: 2rem;
    background: rgba(20, 12, 28, 0.5);
    border-radius: 3rem;
    padding: 1.5rem 2rem;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(106, 62, 126, 0.3);
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* LARGER circular logo image */
.raven-logo {
    width: 75px;
    height: 75px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 12px rgba(183, 126, 217, 0.5), 0 0 0 2px #6a3e7e;
    transition: all 0.3s ease;
    filter: drop-shadow(0 0 6px #9c5bc0);
}

.raven-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 18px rgba(183, 126, 217, 0.8), 0 0 0 2px #b77ed9;
}

.store-name {
    font-size: 2rem;
    font-weight: 600;
    background: linear-gradient(135deg, #EBD3F8, #b87ad9, #9b5fc9);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    letter-spacing: 2px;
}

.bio {
    font-size: 0.85rem;
    color: #ccb8e6;
    max-width: 90%;
    font-style: italic;
    border-left: none;
    padding-left: 0;
}

.search-bar {
    width: 100%;
    display: flex;
    justify-content: flex-start;   /* left‑align search bar */
}

.search-box {
    background: #140f1a;
    border: 1px solid #5f3c73;
    border-radius: 60px;
    padding: 0.5rem 1rem;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 300px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: #b77ed9;
    box-shadow: 0 0 12px rgba(183, 126, 217, 0.3);
}
.search-box input {
    background: transparent;
    border: none;
    color: #f0e5ff;
    padding: 0.4rem;
    width: 100%;
    outline: none;
    font-size: 0.85rem;
}
.search-box input::placeholder {
    color: #7a6a8f;
}
.search-box button {
    background: none;
    border: none;
    color: #b684da;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s;
}
.search-box button:hover {
    color: #e9b3ff;
    transform: scale(1.1);
}

/* Categories Pills */
.categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 2rem 0 2rem;
    justify-content: center;
}
.cat-btn {
    background: rgba(20, 12, 32, 0.7);
    backdrop-filter: blur(4px);
    border: 1px solid #6d4b84;
    padding: 0.6rem 1.5rem;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #ddcef2;
    font-family: 'Inter', sans-serif;
}
.cat-btn i {
    margin-right: 8px;
}
.cat-btn.active, .cat-btn:hover {
    background: #4c2c66;
    border-color: #c48ff5;
    color: white;
    box-shadow: 0 0 12px #a55fd9;
    transform: translateY(-2px);
}

/* Products Grid - Responsive columns */
.products-grid {
    display: grid;
    gap: 2rem;
    margin: 2rem 0 3rem;
}

/* Mobile: 2 columns */
@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

/* Tablet: 3 columns */
@media (min-width: 641px) and (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* Desktop: 4 columns */
@media (min-width: 1025px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
}

.product-card {
    background: linear-gradient(145deg, #150f1e, #0c0815);
    border-radius: 32px;
    padding: 1rem;
    transition: all 0.35s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border: 1px solid #352743;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 20px -5px rgba(0,0,0,0.6);
    display: flex;
    flex-direction: column;
    height: 100%;
}
.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(183, 126, 217, 0.1), transparent);
    transition: left 0.5s;
}
.product-card:hover::before {
    left: 100%;
}
.product-card:hover {
    transform: translateY(-10px);
    border-color: #b77ed9;
    box-shadow: 0 25px 35px -12px #2a153b;
}

/* Product Image Styles */
.product-img {
    width: 100%;
    height: 240px;
    border-radius: 24px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1d1624, #120c1a);
    margin-bottom: 1rem;
    cursor: pointer;
    flex-shrink: 0;
}

.product-img.has-image {
    background: #0c0815;
    padding: 0;
}

.product-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

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

.product-img-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #c495f0;
    background: linear-gradient(135deg, #1d1624, #120c1a);
    position: absolute;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* Subtle overlay on images */
.product-img.has-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(183, 126, 217, 0.15), transparent);
    pointer-events: none;
    z-index: 1;
}

.product-title {
    font-weight: 600;
    font-size: 1.15rem;
    margin: 0.5rem 0 0.3rem;
    text-transform: capitalize;
    font-family: 'Cormorant Garamond', serif;
    letter-spacing: 0.5px;
}

.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e3b5ff;
    margin: 0.4rem 0;
}

.desc {
    font-size: 0.75rem;
    color: #b49fcd;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    flex-grow: 1;
}

.add-to-cart-btn {
    background: #2f1d3e;
    border: none;
    color: white;
    padding: 0.7rem 0;
    width: 100%;
    border-radius: 40px;
    font-weight: 600;
    margin-top: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
    margin-top: auto;
    flex-shrink: 0;
}

.add-to-cart-btn:hover {
    background: #7b3faa;
    box-shadow: 0 0 15px #ab6ed1;
    transform: scale(1.02);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem;
    font-size: 1.2rem;
    color: #bcaae6;
    background: rgba(20, 12, 28, 0.4);
    border-radius: 60px;
    grid-column: 1 / -1;
}
.no-results i {
    margin-right: 10px;
    font-size: 1.5rem;
}

/* Cart Sidebar */
.cart-sidebar {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: #0c0815e6;
    backdrop-filter: blur(12px);
    border-left: 2px solid #6d4b84;
    z-index: 1000;
    transition: right 0.4s ease;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 30px rgba(0,0,0,0.8);
}
.cart-sidebar.open {
    right: 0;
}
.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #7a5a9a;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}
.cart-header h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.6rem;
}
.close-cart {
    background: none;
    border: none;
    color: #cfb3e6;
    font-size: 1.8rem;
    cursor: pointer;
    transition: 0.2s;
}
.close-cart:hover {
    color: #e9b3ff;
    transform: scale(1.1);
}
.cart-items {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #1c1427;
    margin-bottom: 0.8rem;
    padding: 0.8rem;
    border-radius: 20px;
    border-left: 3px solid #b77ed9;
}
.cart-item-info {
    flex: 1;
}
.cart-item-name {
    font-weight: 600;
    font-size: 0.95rem;
}
.cart-item-price {
    font-size: 0.8rem;
    color: #e3b5ff;
}
.cart-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.cart-item-actions button {
    background: #2f1d3e;
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
.cart-item-actions button:hover {
    background: #7b3faa;
    transform: scale(1.05);
}
.remove-item {
    background: #4a2a2a !important;
}
.remove-item:hover {
    background: #6b3a3a !important;
}
.cart-footer {
    border-top: 1px solid #5a3a72;
    padding-top: 1rem;
}
.cart-total {
    font-size: 1.3rem;
    font-weight: bold;
    text-align: right;
    margin-bottom: 1.2rem;
    color: #e3b5ff;
}
.checkout-btn {
    background: #7b3faa;
    width: 100%;
    padding: 0.8rem;
    border: none;
    border-radius: 40px;
    color: white;
    font-weight: bold;
    cursor: pointer;
    transition: 0.2s;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.checkout-btn:hover {
    background: #9b5fc9;
    transform: scale(1.02);
    box-shadow: 0 0 15px #ab6ed1;
}

/* Footer Links */
.footer-links {
    margin-top: 3rem;
    border-top: 1px solid #362545;
    padding: 2rem 0 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}
.direct-contact {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}
.contact-method {
    background: #1c1427;
    padding: 0.6rem 1.8rem;
    border-radius: 60px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    text-decoration: none;
    color: #ece4e4;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}
.whatsapp {
    background: #25D36620;
    border-color: #25D36660;
}
.whatsapp:hover {
    background: #25D36640;
    transform: translateY(-3px);
    box-shadow: 0 0 12px #25D36660;
}
.insta {
    background: #d6297620;
    border-color: #d6297680;
}
.insta:hover {
    background: #d6297640;
    transform: translateY(-3px);
}
.fb {
    background: #1877f220;
    border-color: #1877f2;
}
.fb:hover {
    background: #1877f240;
    transform: translateY(-3px);
}
.shipping-note {
    font-size: 0.8rem;
    color: #ab97c2;
    margin-top: 0.5rem;
}
.shipping-note i {
    margin-right: 6px;
}

/* Playful PS note style */
.ps-note {
    font-size: 0.75rem;
    color: #c4a6e0;
    margin-top: 0.75rem;
    padding-top: 0.5rem;
    border-top: 1px dashed rgba(183, 126, 217, 0.3);
    font-style: italic;
    letter-spacing: 0.3px;
}
.ps-note i {
    margin-right: 5px;
    color: #b77ed9;
}

/* Ethereal Background Elements */
.ethereal-bg {
    position: fixed;
    bottom: 20px;
    left: 20px;
    opacity: 0.15;
    pointer-events: none;
    font-size: 3rem;
    z-index: 0;
    animation: pulse 4s ease-in-out infinite;
}
.crescent {
    position: fixed;
    top: 12%;
    right: 30px;
    font-size: 5rem;
    opacity: 0.12;
    pointer-events: none;
    transform: rotate(15deg);
    z-index: 0;
    transition: opacity 1s ease;
}
@keyframes pulse {
    0%, 100% { opacity: 0.1; }
    50% { opacity: 0.2; }
}

/* Image Modal Styles */
/* Image Modal – animated entrance */
.image-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.image-modal.active {
    display: flex;
    opacity: 1;
    visibility: visible;
}

.image-modal .modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 16px;
    box-shadow: 0 0 40px rgba(183, 126, 217, 0.4);
    border: 2px solid #b77ed9;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #cfb3e6;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}
.close-modal:hover {
    color: #e9b3ff;
    text-shadow: 0 0 10px #b77ed9;
}

/* Responsive small adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    .brand-section {
        padding: 1rem;
        gap: 0.8rem;
    }
    .raven-logo {
        width: 60px;
        height: 60px;
    }
    .store-name {
        font-size: 1.6rem;
    }
    .product-img {
        height: 180px;
    }
    .categories {
        gap: 0.6rem;
    }
    .cat-btn {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
    }
    .direct-contact {
        gap: 1rem;
    }
    .contact-method {
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
}

@media (max-width: 480px) {
    .product-img {
        height: 150px;
    }
    .product-title {
        font-size: 0.9rem;
    }
    .price {
        font-size: 1.1rem;
    }
    .add-to-cart-btn {
        font-size: 0.7rem;
        padding: 0.5rem 0;
    }
}

/* ===== FILTER WRAPPER – STACKED, RIGHT‑ALIGNED ===== */
.filter-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    margin: 1rem 0 2rem;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(20, 12, 28, 0.5);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
    border: 1px solid #6d4b84;
    font-size: 0.75rem;
}
.sort-controls label {
    font-size: 0.75rem;
    color: #ddcef2;
}
#sortSelect {
    background: #1c1427;
    border: 1px solid #6d4b84;
    color: #ece4e4;
    padding: 0.2rem 0.6rem;
    border-radius: 40px;
    font-size: 0.7rem;
    cursor: pointer;
    outline: none;
}
.stock-filter {
    background: rgba(20, 12, 28, 0.5);
    backdrop-filter: blur(4px);
    padding: 0.3rem 0.8rem;
    border-radius: 40px;
    border: 1px solid #6d4b84;
    font-size: 0.7rem;
}
.stock-filter label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    cursor: pointer;
    color: #ddcef2;
    font-size: 0.7rem;
}
.stock-filter input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #b77ed9;
}

/* ===== PRICE ROW WITH LOW-STOCK BADGE ===== */
.price-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.4rem 0;
}
.price {
    font-size: 1.4rem;
    font-weight: 700;
    color: #e3b5ff;
    margin: 0;
}
.low-stock-badge {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    color: #e85d5d;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.65rem;
    font-weight: bold;
    border: 1px solid #b77ed9;
    white-space: nowrap;
}

/* ===== SOLD OUT BADGE ===== */
.sold-out-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.85);
    color: #e9b3ff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: bold;
    z-index: 10;
    border: 1px solid #b77ed9;
    backdrop-filter: blur(4px);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Out of stock card styling */
.product-card.out-of-stock {
    opacity: 0.7;
    filter: grayscale(0.3);
    pointer-events: none;
}
.product-card.out-of-stock .add-to-cart-btn {
    opacity: 0.5;
    cursor: not-allowed;
    background: #2a1a36;
    pointer-events: none;
}

/* ===== IMPROVED MOBILE CARD LAYOUT – KEEP 2 COLUMNS, BETTER PROPORTIONS ===== */
@media (max-width: 640px) {
    .brand-section {
        padding: 1rem;
        gap: 0.8rem;
    }
    .raven-logo {
        width: 50px;
        height: 50px;
    }
    .store-name {
        font-size: 1.4rem;
    }
    .bio {
        font-size: 0.75rem;
        max-width: 100%;
    }
    .categories {
        gap: 0.5rem;
        margin: 0.5rem 0;
    }
    .cat-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.7rem;
    }
    .filter-wrapper {
        margin: 0 0 1rem;
        gap: 0.3rem;
    }
    .sort-controls {
        padding: 0.2rem 0.6rem;
        font-size: 0.65rem;
    }
    .sort-controls label {
        font-size: 0.65rem;
    }
    #sortSelect {
        font-size: 0.6rem;
        padding: 0.15rem 0.5rem;
    }
    .stock-filter {
        padding: 0.2rem 0.6rem;
        font-size: 0.6rem;
    }
    .stock-filter label {
        font-size: 0.6rem;
    }
    .stock-filter input {
        width: 14px;
        height: 14px;
    }
    .products-grid {
        margin-top: 0.5rem;
        gap: 0.8rem;          /* smaller gap between cards */
    }
    .product-card {
        padding: 0.7rem;
        border-radius: 24px;
    }
    .product-img {
        height: 200px;         /* tall or short imageee */
        border-radius: 20px;
    }
    .product-title {
        font-size: 0.9rem;
        margin: 0.3rem 0 0.1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .price-row {
        margin: 0.2rem 0;
        flex-wrap: nowrap;
    }
    .price {
        font-size: 1.1rem;
    }
    .low-stock-badge {
        font-size: 0.55rem;
        padding: 2px 6px;
        white-space: nowrap;
    }
    .desc {
        font-size: 0.65rem;
        margin-bottom: 0.4rem;
        line-height: 1.2;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .add-to-cart-btn {
        padding: 0.5rem 0;
        font-size: 0.7rem;
        margin-top: 0.3rem;
        gap: 5px;
    }
}

/* Even smaller phones */
@media (max-width: 480px) {
    .product-img {
        height: 170px;
    }
    .product-title {
        font-size: 0.8rem;
    }
    .price {
        font-size: 1rem;
    }
    .desc {
        font-size: 0.6rem;
        -webkit-line-clamp: 2;
    }
    .add-to-cart-btn {
        font-size: 0.65rem;
        padding: 0.4rem 0;
    }
}


/* ===== MULTI-IMAGE CAROUSEL STYLES ===== */
.product-img {
    position: relative;
}

.carousel-dots {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 15;
    background: rgba(0,0,0,0.5);
    padding: 4px 8px;
    border-radius: 20px;
    width: fit-content;
    margin: 0 auto;
    backdrop-filter: blur(2px);
}

.dot {
    width: 5px;
    height: 5px;
    background-color: #cfb3e6;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.dot.active {
    background-color: #b77ed9;
    transform: scale(1.3);
    box-shadow: 0 0 4px #b77ed9;
}

.product-image.hidden {
    display: none;
}

/* Modal gallery styles */
.modal-gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-gallery-img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 1rem 0.5rem;
    cursor: pointer;
    z-index: 2010;
    border-radius: 8px;
    transition: 0.2s;
}
.modal-prev { left: 20px; }
.modal-next { right: 20px; }
.modal-prev:hover, .modal-next:hover {
    background: #b77ed9;
    color: #0a0510;
}

.modal-counter {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: #cfb3e6;
    font-size: 0.9rem;
    background: rgba(0,0,0,0.5);
    width: fit-content;
    margin: 0 auto;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: monospace;
}



/* Modal product info panel */
/* Modal product info panel – with scale transition */
.image-modal .modal-product-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    background: rgba(15, 10, 25, 0.95);
    backdrop-filter: blur(8px);
    border-radius: 32px;
    border: 1px solid #b77ed9;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
}

/* animationnnn */

.image-modal.active .modal-product-container {
    animation: gentlePop 0.4s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes gentlePop {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}



@media (min-width: 768px) {
    .image-modal .modal-product-container {
        flex-direction: row;
        width: 85%;
    }
}

/* gallery part (image viewer) */
.modal-gallery-container {
    flex: 2;
    position: relative;
    min-height: 300px;
    background: #0c0815;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal-gallery-img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: 16px;
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.6);
    color: white;
    border: none;
    font-size: 2rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.modal-prev { left: 10px; }
.modal-next { right: 10px; }
.modal-prev:hover, .modal-next:hover { background: #b77ed9; color: #0a0510; }

.modal-counter {
    position: absolute;
    bottom: 10px;
    left: 0;
    right: 0;
    text-align: center;
    background: rgba(0,0,0,0.6);
    width: fit-content;
    margin: 0 auto;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    color: #cfb3e6;
}

/* product info panel */
.modal-product-info {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(0,0,0,0.4);
    border-left: 1px solid rgba(183, 126, 217, 0.3);
}

.modal-product-name {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2rem;
    font-weight: 600;
    color: #e9b3ff;
}

.modal-product-price {
    font-size: 1.6rem;
    font-weight: bold;
    color: #e3b5ff;
}

.modal-product-desc {
    font-size: 0.9rem;
    color: #ccb8e6;
    line-height: 1.4;
}

.modal-add-to-cart {
    background: #2f1d3e;
    border: none;
    color: white;
    padding: 0.8rem;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1rem;
    width: 100%;
    margin-top: 1rem;
}

.modal-add-to-cart:hover {
    background: #7b3faa;
    transform: scale(1.02);
}

.product-title-link {
    cursor: pointer;
    transition: text-decoration 0.2s;
}
.product-title-link:hover {
    text-decoration: underline;
}


/* Add to cart hover pulse */
.add-to-cart-btn:hover {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* Product image zoom on hover */
.product-img:hover .product-image {
    transform: scale(1.1);
    transition: transform 0.4s ease;
}

/* Fade-in for product cards when they appear */
.product-card {
    animation: fadeInUp 0.4s ease backwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Glowing crescent moon in modal background */
.modal-crescent {
    position: absolute;
    bottom: 17%;
    right: 10%; 
    font-size: 5rem;
    color: #b77ed9;
    opacity: 0;
    pointer-events: none;
    z-index: 1;
    filter: drop-shadow(0 0 15px #b77ed9);
    transition: opacity 0.5s ease 0.2s;
}

.image-modal.active .modal-crescent {
    opacity: 0.3;
    animation: gentleFloat 6s ease-in-out infinite;
}

@keyframes gentleFloat {
    0% {
        transform: translateY(0px) rotate(-5deg);
    }
    50% {
        transform: translateY(-15px) rotate(0deg);
    }
    100% {
        transform: translateY(0px) rotate(-5deg);
    }
}


/* Closing animation – reverse of gentlePop */
.modal-product-container.closing {
    animation: gentleClose 0.3s cubic-bezier(0.34, 1.2, 0.64, 1) forwards;
}

@keyframes gentleClose {
    0% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    100% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
}