/**
 * OriginMark™ Bridal Jewelry Carousel Styles
 * Using Slick Carousel Library
 *
 * Features:
 * - Center mode with side items visible
 * - Responsive design
 * - Custom arrow and dot styling
 * - Smooth transitions
 */

/* ========================================
   1. CSS VARIABLES
   ======================================== */

:root {
    /* Brand Colors */
    --carousel-primary: #2D5F5D;
    --carousel-brown: #4E3921;
    --carousel-light-brown: #4E392B;

    /* Neutral Colors */
    --carousel-bg: #f5f5f5;
    --carousel-white: #ffffff;
    --carousel-shadow: rgba(0, 0, 0, 0.1);
    --carousel-shadow-dark: rgba(0, 0, 0, 0.15);

    /* Spacing */
    --carousel-spacing-xl: 60px;
    --carousel-spacing-lg: 40px;
    --carousel-spacing-md: 30px;
    --carousel-spacing-sm: 20px;

    /* Typography */
    --carousel-font-serif: 'Merriweather', Georgia, serif;
    --carousel-font-sans: 'Helvetica Neue', sans-serif;
}

/* ========================================
   2. SECTION BASE STYLES
   ======================================== */

.section-jewellery-showcase {
    width: 100%;
    padding: var(--carousel-spacing-xl) var(--carousel-spacing-sm);
    background: linear-gradient(to bottom, var(--carousel-white), var(--carousel-bg));
    position: relative;
    overflow: hidden;
}

/* Section Header */
.carousel-header {
    text-align: center;
    margin-bottom: var(--carousel-spacing-lg);
}

.carousel-title {
    font-family: var(--carousel-font-serif);
    font-weight: 300;
    font-size: 36px;
    line-height: 1.2;
    color: var(--carousel-brown);
    margin: 0;
    padding: 0;
    text-align: left;
    padding-left: var(--carousel-spacing-lg);
    padding: 20px 20px 20px 20px;
}

/* ========================================
   3. CAROUSEL CONTAINER
   ======================================== */

.carousel-container {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

/* ========================================
   4. SLICK CAROUSEL BASE
   ======================================== */

.jewelry-carousel {
    padding: 40px 0;
    position: relative;
    /* overflow: hidden; */
}

/* Ensure only 3 slides visible at a time */
.jewelry-carousel .slick-list {
    overflow: visible;
    margin: 0 auto;
    min-height: 190px;
}

.jewelry-carousel .slick-track {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Carousel Item */
.carousel-item {
    padding: 20px;
    outline: none;
    cursor: pointer;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.carousel-item-inner {
    position: relative;
    width: 100%;
    max-width: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.carousel-item-image {
    width: 100%;
    max-width: 450px;
    height: auto;
    aspect-ratio: 1 / 1;
    margin: 0 auto;
    display: block;
    border-radius: 20px;
    box-shadow: 0 10px 40px var(--carousel-shadow);
    transition: all 0.4s ease-in-out;
    object-fit: cover;
}

/* CENTER SLIDE (Active) - MUCH BIGGER and prominent */
.slick-center .carousel-item-image,
.slick-current.slick-active.slick-center .carousel-item-image {
    transform: scale(1.35);
    opacity: 1;
    /* box-shadow: 0 25px 80px var(--carousel-shadow-dark); */
    z-index: 100;
    position: relative;
}

/* SIDE SLIDES (Non-active) - Smaller, transparent, and behind */
.slick-slide:not(.slick-center) .carousel-item-image {
    transform: scale(0.65);
    opacity: 0.3;
    box-shadow: 0 5px 20px var(--carousel-shadow);
    z-index: 1;
    position: relative;
}

/* Ensure center slide is always on top with high z-index */
.slick-center,
.slick-current.slick-active.slick-center {
    z-index: 100 !important;
}

.slick-slide:not(.slick-center) {
    z-index: 1;
}

/* Hover effect on non-center slides - hint they're clickable */
.slick-slide:not(.slick-center):hover .carousel-item-image {
    opacity: 0.5;
    transform: scale(0.68);
    box-shadow: 0 10px 30px var(--carousel-shadow-dark);
    cursor: pointer;
}

/* ========================================
   5. PRODUCT INFORMATION (Inside Each Card)
   ======================================== */

.product-info {
    text-align: center;
    margin-top: 20px;
    padding: 0 20px;
    opacity: 0;  /* Hidden by default */
    transform: translateY(10px);
    transition: all 0.4s ease-in-out;
    pointer-events: none;
    margin-top: -80px;
}

/* Show product info ONLY on center (active) slide */
.slick-center .product-info {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    z-index: 99999;
    margin-top: -7px;
}

.product-name {
    font-family: var(--carousel-font-serif);
    font-size: 28px;
    line-height: 1.3;
    color: var(--carousel-light-brown);
    margin: 0 0 2px 0;
    font-weight: 500;
}

.product-code {
    font-family: var(--carousel-font-sans);
    font-size: 18px;
    line-height: 1.4;
    color: var(--carousel-light-brown);
    margin: 0;
    letter-spacing: 2px;
    letter-spacing: 5px;
    font-family: Merriweather;
}

.code-light {
    font-weight: 300;
}

.code-bold {
    font-weight: 900;
}

/* ========================================
   6. SLICK ARROWS (Navigation)
   ======================================== */

.slick-arrow {
    width: 60px;
    height: 60px;
    background: var(--carousel-white) !important;
    border: 2px solid var(--carousel-primary);
    border-radius: 50%;
    z-index: 100;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.slick-arrow:before {
    content: '' !important;
}

.slick-arrow svg {
    stroke: var(--carousel-primary);
    transition: stroke 0.3s ease;
}

.slick-arrow:hover {
    /* background: var(--carousel-primary) !important; */
    /* border-color: var(--carousel-primary); */
    /* transform: scale(1.1); */
}

.slick-arrow:hover svg {
    /* stroke: var(--carousel-white); */
}

.slick-prev {
    left: 20px;
}

.slick-next {
    right: 20px;
}

.slick-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ========================================
   7. SLICK DOTS (Indicators)
   ======================================== */

.slick-dots {
    bottom: -50px;
    display: flex !important;
    justify-content: center;
    align-items: center;
    gap: 12px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.slick-dots li {
    width: 12px;
    height: 12px;
    margin: 0;
    transition: all .3s ease;
}

.slick-dots li button {
   width: 11px;
   height: 11px;
   border-radius: 50%;
   border: none;
   background: white;
   cursor: pointer;
   padding: 0;
   transition: all 300ms 
ease;
   border: 2px solid #2d5f5d;
   border-radius: 22px;
   position: relative;
   top: -3px;
   background: transparent;
}

.slick-dots li button:before {
    content: '' !important;
}

.slick-dots li:hover button {
    background: #999999;
    transform: scale(1.2);
}

.slick-dots li.slick-active button {
    background: var(--carousel-primary);
    width: 12px;
    height: 12px;
    background: #2d5f5d;
    width: 27px;
    height: 11px;
    border: 2px solid #2d5f5d;
    border-radius: 5px;
    top: -3px;
    position: relative;
}

/* ========================================
   8. VIEW MORE BUTTON
   ======================================== */

.carousel-cta {
    text-align: center;
    margin-top: 0px;
}

.btn-view-more {
    display: inline-block;
    padding: 14px 50px;
    border: 2px solid var(--carousel-primary);
    border-radius: 50px;
    background: transparent;
    color: var(--carousel-primary);
    font-family: var(--carousel-font-sans);
    font-size: 16px;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.btn-view-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--carousel-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.btn-view-more:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.btn-view-more:hover {
    color: var(--carousel-white);
    box-shadow: 0 4px 15px rgba(45, 95, 93, 0.3);
    transform: scale(1.05);
}

/* ========================================
   9. RESPONSIVE DESIGN
   ======================================== */

/* Tablets (< 1024px) */
@media (max-width: 1023px) {
    .carousel-title {
        font-size: 30px;
        padding-left: var(--carousel-spacing-sm);
    }

    .carousel-item-inner {
        max-width: 380px;
    }

    .carousel-item-image {
        max-width: 380px;
    }

    .slick-center .carousel-item-image,
    .slick-current.slick-active.slick-center .carousel-item-image {
        transform: scale(1.25);
    }

    .slick-slide:not(.slick-center) .carousel-item-image {
        transform: scale(0.6);
        opacity: 0.25;
    }

    .product-name {
        font-size: 24px;
    }

    .product-code {
        font-size: 16px;
    }

    .slick-arrow {
        width: 50px;
        height: 50px;
    }

    .slick-arrow svg {
        width: 20px;
        height: 20px;
    }
}

/* Mobile (< 768px) */
@media (max-width: 767px) {
    .section-jewellery-showcase {
        padding: 0px;
    }

    .carousel-title {
        font-size: 26px;
        margin-bottom: var(--carousel-spacing-md);
    }

    .jewelry-carousel {
        padding: 30px 0 0px 0;
    }

    .carousel-item {
        padding: 10px;
    }

    .carousel-item-inner {
        max-width: 320px;
    }

    .carousel-item-image {
        max-width: 320px;
    }

    .slick-center .carousel-item-image,
    .slick-current.slick-active.slick-center .carousel-item-image {
        transform: scale(1.6);
    }

    .slick-slide:not(.slick-center) .carousel-item-image {
        transform: scale(0.85);
        opacity: 0.65;
    }

    .product-info {
        margin-top: 15px;
        padding: 0 10px;
    }

    .product-name {
        font-size: 20px;
    }

    .product-code {
        font-size: 14px;
        letter-spacing: 3px;
    }

    .slick-arrow {
        width: 45px;
        height: 45px;
    }

    .slick-arrow svg {
        width: 18px;
        height: 18px;
    }

    .slick-prev {
        left: 10px;
    }

    .slick-next {
        right: 10px;
    }

    .carousel-cta {
        display: none; /* Hide View More button on mobile */
    }

    .slick-dots {
        bottom: -40px;
    }
}

/* Extra Small Mobile (< 480px) */
@media (max-width: 479px) {
    .carousel-title {
        /* font-size: 22px; */
    }

    .carousel-item-inner {
        /* max-width: 260px; */
    }

    .carousel-item-image {
        max-width: 260px;
    }

    .product-info {
        margin-top: -7px;
    }

    .product-name {
        font-size: 12px;
    }

    .product-code {
        font-size: 12px;
    }

    /* Hide arrows on very small screens */
    .slick-arrow {
        /* display: none !important; */
    }

    .slick-dots li button,
    .slick-dots li.slick-active button {
        /* width: 10px; */
        /* height: 10px; */
    }
}

/* ========================================
   10. ACCESSIBILITY
   ======================================== */

.slick-arrow:focus-visible,
.slick-dots li button:focus-visible,
.btn-view-more:focus-visible {
    outline: 3px solid var(--carousel-primary);
    outline-offset: 3px;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .carousel-item-image,
    .slick-arrow,
    .slick-dots li button,
    .btn-view-more {
        transition-duration: 0.01ms !important;
    }

    .slick-track {
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   11. SLICK CAROUSEL FIXES
   ======================================== */

/* Fix for slick track positioning */
.slick-track {
    display: flex !important;
    align-items: baseline;
}

.slick-slide {
    height: auto;
}

/* Ensure smooth sliding */
.slick-list {
    overflow: hidden;
    position: relative;
}

/* Remove default Slick theme styles we're overriding */
.slick-dots li button:hover,
.slick-dots li button:focus {
    outline: none;
}

.product-code span {
    font-family: Merriweather;
}
