:root {
    --primary-color: #d4af37;
    /* Metallic Gold */
    --secondary-color: #f9f9f9;
    /* Off White */
    --text-color: #333333;
    --accent-color: #e6c2bf;
    /* Soft Rose */
    --dark-accent: #2c3e50;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Playfair Display', serif;
    --transition-speed: 0.3s;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--secondary-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

body.loaded {
    opacity: 1;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    color: var(--dark-accent);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

/* Header & Nav */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-accent);
    letter-spacing: 1px;
    text-decoration: none;
}

.logo span {
    color: var(--primary-color);
}

.main-nav {
    display: flex;
    gap: 2rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.cart-icon {
    position: relative;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--dark-accent);
    transition: transform var(--transition-speed);
}

.cart-icon:hover {
    transform: scale(1.1);
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.cart-count.active {
    opacity: 1;
}

/* Hero Section */
.hero {
    height: 60vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: url('banner.jpg') no-repeat center center;
    background-size: cover;
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    top: -50px;
    left: -50px;
    animation: float 6s ease-in-out infinite;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: fadeIn 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    color: #666;
    max-width: 600px;
    margin-bottom: 2rem;
    animation: fadeIn 1s ease-out 0.2s backwards;
}

.cta-button {
    padding: 1rem 2.5rem;
    background-color: var(--dark-accent);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
    animation: fadeIn 1s ease-out 0.4s backwards;
}

.cta-button:hover {
    background-color: transparent;
    border-color: var(--dark-accent);
    color: var(--dark-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.secondary-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    border: 1px solid var(--dark-accent);
    color: var(--dark-accent);
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s;
    font-weight: 500;
}

.secondary-btn:hover {
    background-color: var(--dark-accent);
    color: white;
}

/* Page Header */
.page-header {
    background-color: #f4f4f4;
    padding: 4rem 5%;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.page-header p {
    color: #777;
    max-width: 600px;
    margin: 0 auto;
    width: fit-content;
}

/* Text Content & About */
.text-content {
    max-width: 1000px;
    margin: 0 auto;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    width: fit-content;
}

.about-text p {
    margin-bottom: 1rem;
    color: #555;
    width: fit-content;
}

.about-text ul {
    list-style: none;
    margin-left: 1rem;
    width: fit-content;
}

.about-text ul li::before {
    content: '•';
    color: var(--primary-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-left: -1em;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* Products Grid */
.container {
    padding: 4rem 5%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark-accent);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    justify-content: center;
    /* Center the grid items if they don't fill the row */
}

.product-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.product-image-container {
    height: 300px;
    width: 100%;
    overflow: hidden;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Needed for absolute positioning of hover image */
    padding: 20px;
}

.product-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.5s ease, transform 0.5s ease;
    position: absolute;
    /* Stack images */
    border-radius: 12px;
}

/* Primary Image (Front) */
.product-image.front {
    z-index: 2;
    opacity: 1;
}

/* Secondary Image (Back/Hover) */
.product-image.back {
    z-index: 1;
    opacity: 0;
    transform: scale(1.1);
    /* Slight zoom start for effect */
}

/* Hover Effects */
.product-card:hover .product-image.front {
    opacity: 0;
    /* Fade out front */
}

.product-card:hover .product-image.back {
    opacity: 1;
    /* Fade in back */
    transform: scale(1.0);
    /* Reset scale for effect */
}

.product-info {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--dark-accent);
}

.product-desc {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 1rem;
    flex-grow: 1;
    max-height: 4.5em;
    /* Exactly 3 lines */
    overflow: hidden;
    position: relative;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-desc::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    height: 1.5em;
    background: linear-gradient(transparent, white);
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.product-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
}

.add-to-cart {
    padding: 0.8rem 1.5rem;
    background-color: white;
    border: 2px solid var(--dark-accent);
    color: var(--dark-accent);
    border-radius: 30px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.add-to-cart:hover {
    background-color: var(--dark-accent);
    color: white;
}

/* Cart Sidebar */
.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed);
    z-index: 1001;
    backdrop-filter: blur(4px);
}

.cart-overlay.open {
    opacity: 1;
    visibility: visible;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100%;
    background: white;
    z-index: 1002;
    transition: right var(--transition-speed) cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -5px 0 30px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 2rem;
}

.cart-sidebar.open {
    right: 0;
}

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.close-cart {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-color);
}

.cart-items {
    flex-grow: 1;
    overflow-y: auto;
    overflow-x: hidden;
    /* Prevent horz scroll on animation */
    margin-bottom: 2rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.3s ease-out;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.cart-item.removing {
    opacity: 0;
    transform: translateX(50px);
}

.cart-item-img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 10px;
    background-color: #f9f9f9;
}

.cart-item-details {
    flex-grow: 1;
}

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-price {
    color: var(--primary-color);
    font-weight: 600;
}

.remove-btn {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.8rem;
    margin-top: 5px;
    display: inline-block;
}

.cart-footer {
    border-top: 1px solid #eee;
    padding-top: 1.5rem;
}

.total-row {
    display: flex;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.checkout-btn {
    width: 100%;
    padding: 1rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition-speed);
}

.checkout-btn:hover {
    background-color: #c09b2d;
}

/* Custom Cursor */
body {
    cursor: none;
    /* Hide default cursor */
}

.custom-cursor-dot,
.custom-cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 9999;
    pointer-events: none;
}

.custom-cursor-dot {
    width: 8px;
    height: 8px;
    background-color: var(--dark-accent);
}

.custom-cursor-outline {
    width: 40px;
    height: 40px;
    border: 1px solid var(--dark-accent);
    transition: width 0.2s, height 0.2s, background-color 0.2s, border-radius 0.2s, border-color 0.2s;
}

/* Text Hover State (Line shape) */
body.text-hovering .custom-cursor-outline {
    width: 3px;
    height: 24px;
    border-radius: 0;
    background-color: var(--dark-accent);
    border-color: transparent;
}

body.text-hovering .custom-cursor-dot {
    opacity: 0;
}

/* Hover State (Interactable) */
body.hovering .custom-cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(212, 175, 55, 0.1);
    /* Gold tint */
    border-color: var(--primary-color);
    border-radius: 50%;
    /* Ensure it stays round if switching from text */
}

body.hovering .custom-cursor-dot {
    background-color: var(--primary-color);
    opacity: 1;
    /* Show dot */
}

/* Ensure interactive elements still show pointer if JS fails or for fallback */
a,
button,
.cart-icon,
.product-card {
    cursor: none;
    /* Force hide everywhere */
}

/* Footer */
footer {
    padding: 2rem 5%;
    text-align: center;
    background-color: white;
    border-top: 1px solid #eee;
    color: #999;
}

/* Product Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-container {
    background: white;
    width: 90%;
    max-width: 1100px;
    max-height: 90vh;
    border-radius: 30px;
    overflow: hidden;
    display: flex;
    position: relative;
    transform: scale(0.9) translateY(40px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.open .modal-container {
    transform: scale(1) translateY(0);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 2.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark-accent);
    z-index: 10;
    transition: transform 0.3s;
}

.close-modal:hover {
    transform: rotate(90deg);
}

.modal-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    overflow-y: auto;
}

.modal-gallery {
    padding: 2rem;
    background: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image-container {
    width: 100%;
    height: 450px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 20px;
}

.main-modal-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transition: opacity 0.3s;
}

.thumbnail-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.thumb-img {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
    background: white;
}

.thumb-img:hover,
.thumb-img.active {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.modal-details {
    padding: 3rem;
    display: flex;
    flex-direction: column;
}

.modal-details h2 {
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.modal-price {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.modal-description {
    color: #555;
    line-height: 1.8;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.modal-actions {
    margin-top: auto;
}

.modal-add-btn {
    width: 100%;
    padding: 1.2rem;
    font-size: 1.2rem;
    background-color: var(--dark-accent);
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.modal-add-btn:hover {
    background-color: var(--primary-color);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

@media (max-width: 900px) {
    .modal-content-wrapper {
        grid-template-columns: 1fr;
    }

    .modal-container {
        max-height: 95vh;
    }

    .modal-details {
        padding: 2rem;
    }
}

@media (max-width: 600px) {
    .cart-sidebar {
        width: 100%;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .main-nav {
        display: none;
        /* Mobile nav TODO */
    }
}