/* Base styles */
:root {
    --accent: #5b8cff;
    --accent-2: #c7e22b;
    /* green accent used across product details */
    --muted: #6c757d;
}

html,
body {
    height: 100%;
    overflow-x: hidden;
}

body {
    font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial;
    background: linear-gradient(180deg, #f6f9fc, #ffffff);
    color: #212529;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 0 !important;
    width: 100% !important;
}

main {
    min-height: 60vh;
    display: flex;
    align-items: center;
}

/* Hero layout */
.hero {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), #ffffff);
    overflow: hidden;
}

.hero-illustration {
    max-width: 320px;
    transition: transform .45s ease;
}

.hero-illustration:hover {
    transform: translateY(-6px);
}

/* Decorative shapes */
.shape {
    position: absolute;
    pointer-events: none;
}

.shape-1 {
    right: -60px;
    top: -40px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle at 30% 30%, rgba(91, 140, 255, 0.14), transparent 40%);
    border-radius: 50%;
    filter: blur(12px);
}

.shape-2 {
    left: -40px;
    bottom: -40px;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle at 70% 70%, rgba(124, 224, 198, 0.12), transparent 40%);
    border-radius: 50%;
    filter: blur(10px);
}

/* Header fragment tweaks */
.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.site-header h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.site-header nav a {
    margin-left: 1rem;
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
}

.site-header nav a:hover {
    color: var(--accent);
}

/* Footer fragment tweaks */
.site-footer {
    padding: 1.25rem 0;
    color: var(--muted);
    font-size: 0.95rem;
}

/* Hero card */
.hero {
    border-radius: 14px;
}

/* Product card */
.product-card {
    background: linear-gradient(180deg, #fff, #fbfdff);
}

.product-price {
    color: var(--accent);
    font-weight: 700;
}

/* Product details (right column visual tweaks) */
.product-details .item-number {
    color: var(--accent-2);
    font-weight: 800;
    font-size: 30px;
    letter-spacing: 0.6px;
    text-transform: uppercase;
}

.product-details .product-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: .25rem;
}

.product-divider {
    border: 0;
    border-top: 1px solid #efefef;
    margin: 1.25rem 0;
}

/* Swatches */
.color-swatches .swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid rgba(0, 0, 0, 0.06);
    display: inline-block;
    padding: 0;
    box-sizing: border-box;
    transition: transform .12s ease, box-shadow .12s ease;
    outline: none;
    overflow: hidden;
}

.color-swatches .swatch-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.color-swatches .swatch:focus {
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.color-swatches .swatch.active {
    box-shadow: 0 0 0 5px var(--accent-2);
    transform: translateY(-2px);
}

/* Specs and decoration columns */
.product-specs h6 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    margin-bottom: .5rem;
}

.product-specs .small.text-muted,
.product-specs ul {
    font-size: 0.95rem;
}

/* Quantity / Price table */
.price-table {
    border-top: 6px solid var(--accent-2);
    background: linear-gradient(180deg, #fff, #fbfdff);
    padding: 0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.03);
}

.price-table table {
    width: 100%;
    border-collapse: collapse;
}

.price-table th,
.price-table td {
    padding: 14px 12px;
    text-align: center;
    border-left: 1px solid #efefef;
}

.price-table th:first-child,
.price-table td:first-child {
    text-align: left;
    font-weight: 700;
    border-left: none;
    width: 160px;
}

.price-table thead th {
    text-align: center;
    font-weight: 700;
}

.rating {
    letter-spacing: 0.5px;
}

.text-success {
    color: var(--accent-2) !important;
}

.modal {
    backdrop-filter: blur(10px);
}

/* Header small tweaks */
.site-header .input-group .form-control {
    border-top-left-radius: 18px;
    border-bottom-left-radius: 18px;
}

.site-header .input-group .btn {
    border-top-right-radius: 18px;
    border-bottom-right-radius: 18px;
}

@media screen and (max-width: 991px) {
    .hero-illustration {
        max-width: 100% !important;
    }

    .product-card {
        background: linear-gradient(180deg, #fff, #fbfdff);
        flex-direction: column;
        justify-content: flex-start !important;
        align-items: flex-start !important;
    }

    .product-card img {
        width: 100% !important;
    }
}

@media (max-width:767px) {
    .site-header .logo .h5 {
        font-size: 1rem;
    }

    .hero {
        padding: 1.25rem;
    }
}

@media (min-width:768px) {
    .hero {
        padding: 2.5rem;
    }

    .hero-illustration {
        max-width: 380px;
    }
}

/* --- Product slider styles --- */
.product-gallery {
    padding: 0;
}

.gallery-main {
    padding: 0;
    position: relative;
}

.main-slider {
    width: 100%;
    overflow: hidden;
    /* allow vertical page scrolling while disabling horizontal touch scrolling */
    touch-action: pan-y;
    cursor: grab;
}

.main-slider.grabbing {
    cursor: grabbing;
}

.main-slider .swiper-wrapper {
    display: flex;
    width: 100%;
    transition: transform .36s ease;
    will-change: transform;
}

.swiper.thumb-slider .swiper-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.main-slider .swiper-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 560px;
    box-sizing: border-box;
}

.main-slider .img-wrap {
    width: 100%;
    max-width: 600px;
    height: 600px; /* target big image size */
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #efefef;
    border-radius: 6px;
    padding: 28px;
    box-sizing: border-box;
    overflow: hidden;
    margin: 0 auto; /* center the square */
}

.main-slider .slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* enforce zoom cursor on the big image so it's clearly clickable */
.main-slider .img-wrap .slide-img { cursor: zoom-in !important; }

.slider-nav-row {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-nav-row .flex-fill {
    position: relative;
}

.thumb-nav-left,
.thumb-nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #eee;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    z-index: 5;
}

.thumb-nav-left {
    left: 6px;
}

.custom-close.bg-transparent {
    width: 50px !important;
    height: 50px !important;
    top: 5px !important;
    right: 5px !important;
    font-size: 24px !important;
}

.custom-close.bg-transparent::after {
    font-size: 28px !important;
}

.thumb-nav-right {
    right: 6px;
}

.modal-artwork .file-upload-label {
    /* height: 38px !important; */
    border-radius: 8px;
}

/* keep nav row inline with layout so it doesn't cover the gallery */
.slider-nav-row {
    position: relative;
}

.slider-nav-left,
.slider-nav-right {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: auto;
    z-index: 9999; /* keep arrows above thumbnails */
}

.slider-nav-left { left: 8px; }
.slider-nav-right { right: 8px; }

.slider-nav-right {
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
}

.slider-nav-left,
.slider-nav-right {
    min-width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(0,0,0,0.06);
    color: var(--accent-2);
    font-size: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdd63d !important;
    position: absolute;
    z-index: 99999; /* ensure arrows always sit above thumbnails */
}

button.btn.btn-sm.thumb-nav-left,
button.btn.btn-sm.thumb-nav-right {
    display: none;
}

.slider-nav-left:hover,
.slider-nav-right:hover {
    background: rgba(0, 0, 0, 0.03);
}

.thumb-slider {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ensure thumbnails sit above neighboring controls and accept pointer events */
.thumb-slider { position: relative; z-index: 2300; pointer-events: auto; }
.slider-nav-row { overflow: visible; }
.thumb-slider .swiper-wrapper { pointer-events: auto; }

.thumb-slider .swiper-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
    padding: 6px 2px;
}

.thumb-slider .swiper-slide {
    flex: 0 0 auto;
    width: 80px;
    height: 80px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    border-radius: 4px;
    background: #fff;
    box-sizing: border-box;
    padding: 6px;
    cursor: pointer;
    pointer-events: auto;
}

.modal-slide.active {
    height: 100%;
    width: 100%;
}

.swiper-slide.thumb.active {
    border: 2px solid #bdd63d;
}

.thumb-slider .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

div.modal {
    z-index: 99999999;
}

/* Modal gallery styles */
.modal-gallery .modal-dialog { max-width: 1240px; }
.modal-gallery .modal-body { display:flex; align-items:center; justify-content:center; padding:20px; }
.modal-gallery .modal-content { background: transparent; border: none; display:flex; align-items:center; justify-content:center; }
.modal-gallery .modal-inner-wrap { width: 1200px; height: 1200px; max-width: 100%; max-height: 100vh; }
.modal-gallery .modal-inner-wrap .img-wrap { width:100%; height:100%; max-width:1200px; max-height:1200px; padding:0; border-radius:6px; }
.modal-gallery .modal-inner-wrap .slide-img { width:100%; height:100%; object-fit:contain; }

/* make modal slider show one large image at a time */
.modal-swiper-wrapper { overflow: hidden; position: relative; width: 100%; height: 100%; }
.modal-swiper-wrapper .modal-slide { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; box-sizing: border-box; }
.modal-swiper-wrapper .modal-slide.active { display: flex; position: relative; }
.modal-gallery .modal-body { background: rgba(0,0,0,0.85); }

/* style the modal gallery close button so it's visible on dark backdrop */
.modal-gallery .btn-close {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff !important;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 6px 18px rgba(0,0,0,0.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}
.modal-gallery .btn-close::before { display: none !important; }
.modal-gallery .btn-close::after {
    content: '\00d7';
    font-size: 20px;
    line-height: 1;
    color: #222;
}

@media (max-width: 767px) {
    .main-slider .img-wrap { height: 360px; max-width: 100%; padding: 16px; }
    .modal-gallery .modal-inner-wrap { width: 100%; height: auto; }
}

.thumb-slider .swiper-slide-thumb-active,
.thumb-slider .swiper-slide.active {
    outline: 2px solid var(--accent-2);
    outline-offset: -6px;
}

.img-tint {
    position: absolute;
    inset: 0;
    pointer-events: none;
    mix-blend-mode: screen;
    opacity: 0;
    transition: background-color .2s ease, opacity .2s ease;
    border-radius: 6px;
}

/* Full-width icon band under product row */
.product-icons-band {
    background: #f6f6f6;
    border-top: 1px solid #e9e9e9;
}

.product-icons-band .container {
    max-width: 1100px;
}

.product-icons-band .icon-btn {
    background: transparent;
    border: none;
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 18px 8px;
    color: #222;
}

.product-icons-band .icon-btn+.icon-btn {
    border-left: 1px solid rgba(0, 0, 0, 0.06);
}

.product-icons-band .icon-btn img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    display: block;
}

.product-icons-band .icon-btn .small {
    margin-top: 6px;
    color: var(--muted);
}

@media (max-width: 768px) {
    main.container-fluid.p-5 {
        padding: 20px !important;
    }

    .row.g-4 {
        width: 100%;
        margin: auto;
    }

    .main-slider .img-wrap,
    .main-slider .swiper-slide {
        height: auto !important;
    }

    .main-slider .swiper-slide {
        flex: 0 0 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: auto;
        box-sizing: border-box;
    }

    .price-table.mb-3 {
        overflow-x: auto !important;
        width: 100% !important;
    }

    .product-icons-band .d-flex {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px;
    }

    .product-icons-band .icon-btn+.icon-btn {
        border-left: unset;
    }
}

@media (max-width: 576px) {
    .product-icons-band .icon-btn img {
        width: 46px;
        height: 46px;
    }

    .product-icons-band .icon-btn {
        padding: 12px 6px;
    }
}

/* Breadcrumb link hover: make links green on hover/focus */
nav[aria-label="breadcrumb"] a {
    color: #6c757d;
    text-decoration: none;
    transition: color .15s ease;
}
nav[aria-label="breadcrumb"] a:hover,
nav[aria-label="breadcrumb"] a:focus {
    color: var(--accent-2) !important;
    text-decoration: underline;
    outline: none;
}