:root {
    --bg-color: #ffffff;
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --accent-color: #d4af37;
    /* Gold */
    --accent-hover: #b8962e;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: center;
    /* Center Logo */
    align-items: center;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.8rem;
    letter-spacing: 2px;
}

/* Product Grid */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 8rem 1rem;
    /* Top padding increased since hero is gone */
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 3rem;
    /* Increased gap */
}

/* Product Card */
.product-card {
    background: white;
    /* Box shadow removed for cleaner look as requested? Keeping it subtle. */
    box-shadow: none;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    transition: var(--transition);
}

/* Image Slider */
.card-slider {
    position: relative;
    /* Aspect ratio removed to allow natural image proportion */
    width: 100%;
    overflow: hidden;
    border-radius: 8px;
    /* Rounded images */
    background: transparent;
    /* Remove white background to avoid bleed */
    /* Fix for "thin line" issue: mask overflow strictly */
    mask-image: -webkit-radial-gradient(white, black);
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}



.slider-track:active {
    cursor: grabbing;
}

.slider-track::-webkit-scrollbar {
    display: none;
}

.slider-img {
    flex: 0 0 100%;
    width: 100%;
    height: auto;
    /* Natural height */
    max-height: 80vh;
    /* Prevent overly tall images */
    object-fit: cover;
    scroll-snap-align: center;
    display: block;
    margin: 0;
    padding: 0;
    /* Prevent selection and ghost dragging */
    user-select: none;
    -webkit-user-select: none;
    -webkit-user-drag: none;
    /* Subpixel gap fix: slight overlap (only safe if opaque) */
    width: 100.5%;
    /* Ensure it definitely fills the box */
    margin-right: -1px;
    /* Pull next item slightly */
    image-rendering: -webkit-optimize-contrast;
}

.slider-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    height: 100%;
    scrollbar-width: none;
    scroll-behavior: auto;
    /* Managed by JS for infinite loop */
    cursor: grab;
    gap: 0;
}

/* Slider Controls */
.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(4px);
    z-index: 5;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.slider-btn:hover {
    opacity: 1;
    background: white;
}

.slider-prev {
    left: 10px;
}

.slider-next {
    right: 10px;
}


/* Select Toggle - Overlay */
.select-container {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 20;
    /* High z-index to sit on top of slider */
    cursor: pointer;
}

.select-toggle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: transparent;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.select-toggle.selected {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: white;
}

/* Card Info */
.card-info {
    padding: 1rem 0;
    text-align: center;
}

/* Card Actions */
.card-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.btn-buy-now {
    flex: 1;
    /* Take remaining space */
    padding: 1rem;
    background: transparent;
    border: 1px solid var(--text-primary);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 700;
}

.btn-buy-now:hover {
    background: var(--text-primary);
    color: white;
}

/* Select/Add to Cart Button (Square) */
.btn-select {
    width: 48px;
    /* Square height approx matches text button padding */
    height: 48px;
    /* Adjust based on computed height of buy button */
    border: 1px solid var(--text-primary);
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    border-radius: 4px;
    /* Slightly rounded square */
}

/* Selected State for the square button */
.btn-select.selected {
    background: var(--text-primary);
    color: white;
}

/* FAB */
.fab-container {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 200;
    transition: var(--transition);
    width: 90%;
    max-width: 400px;
}

.fab-container.hidden {
    transform: translateX(-50%) translateY(150px);
    opacity: 0;
}

.fab {
    position: relative;
    /* For absolute icon positioning */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.2rem;
    border-radius: 12px;
    background: var(--text-primary);
    color: white;
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    width: 100%;
}

/* Absolute position the icon so it doesn't affect text centering */
.fab .material-icons-outlined {
    position: absolute;
    left: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .product-grid {
        grid-template-columns: repeat(1, 1fr);
        /* 1 column on mobile for large vertical images */
        gap: 3rem;
    }
}