/* =============================================================
   Custom Single Product Page — Frontend Styles
   ============================================================= */

/* ---------------------------------------------------------- */
/* Banner Text                                                */
/* ---------------------------------------------------------- */
.csp-banner-text {
    text-align: center;
    padding: 12px 24px;
    margin: 0 0 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #e8f0fe 100%);
    border-top: 3px solid #0f3460;
    border-bottom: 1px solid rgba(15,52,96,.1);
}

.csp-banner-text strong {
    font-size: 1.05em;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: .3px;
}

/* ---------------------------------------------------------- */
/* Product Image — animated glow border, shine sweep          */
/* ---------------------------------------------------------- */
.csp-product-page div.product div.images img,
.csp-product-page .woocommerce-product-gallery__image,
.csp-product-page .woocommerce-product-gallery__image a,
.csp-product-page .woocommerce-product-gallery__image img {
    border-radius: 0 !important;
}

/* Animated colour glow behind the whole gallery */
.csp-product-page .woocommerce-product-gallery {
    position: relative;
    z-index: 1;
}

.csp-product-page .woocommerce-product-gallery::before {
    content: '';
    position: absolute;
    inset: -6px;
    z-index: -1;
    border-radius: 6px;
    background: linear-gradient(135deg, #0f3460, #e94560, #16213e, #0f3460);
    background-size: 300% 300%;
    animation: cspGalleryGlow 5s ease infinite;
    filter: blur(12px);
    opacity: .55;
}

@keyframes cspGalleryGlow {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child {
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 36px rgba(0,0,0,.2);
    transition: box-shadow .35s ease;
}

/* Shine sweep on hover */
.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child::after {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
    transform: skewX(-18deg);
    pointer-events: none;
}

.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child:hover::after {
    animation: cspImageShine .65s ease forwards;
}

@keyframes cspImageShine {
    from { left: -120%; }
    to   { left:  160%; }
}

.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child img {
    display: block;
    transition: transform .4s ease;
}

.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child:hover {
    box-shadow: 0 18px 52px rgba(0,0,0,.28);
}

.csp-product-page div.product div.images .woocommerce-product-gallery__image:first-child:hover img {
    transform: scale(1.04);
}

.csp-product-page .flex-control-thumbs li img {
    border-radius: 0 !important;
    border: 2px solid transparent;
    transition: border-color .2s;
}

.csp-product-page .flex-control-thumbs li img.flex-active,
.csp-product-page .flex-control-thumbs li img:hover {
    border-color: #0f3460;
}

/* ---------------------------------------------------------- */
/* Product Summary — 3D card (right side)                    */
/* ---------------------------------------------------------- */
.csp-product-page div.product .summary {
    background: linear-gradient(160deg, #ffffff 0%, #f7f9ff 100%);
    padding: 28px 26px 24px;
    border-radius: 14px;
    box-shadow:
        0 16px 48px rgba(15,52,96,.1),
        0  4px 16px rgba(0,0,0,.05),
        inset 0 1px 0 rgba(255,255,255,.9);
    border: 1px solid rgba(15,52,96,.07);
    position: relative;
    overflow: visible;  /* never clip price badge */
    transition: transform .18s ease, box-shadow .18s ease;
}

/* Glass sheen */
.csp-product-page div.product .summary::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,255,255,.5) 0%, transparent 50%);
    pointer-events: none;
}

/* ---- Title ---- */
.csp-product-page div.product .summary h1.product_title {
    font-size: 1.85em;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.4px;
    margin-bottom: 14px;
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 70%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(1px 2px 3px rgba(15,52,96,.2));
    animation: cspTitleIn .5s cubic-bezier(.22,1,.36,1) both;
}

@supports not (-webkit-background-clip: text) {
    .csp-product-page div.product .summary h1.product_title {
        color: #0f3460;
        text-shadow: 2px 2px 0 rgba(15,52,96,.18), 4px 4px 0 rgba(15,52,96,.08);
        -webkit-text-fill-color: unset;
    }
}

/* ---- Price — NO perspective/rotateX to prevent clipping ---- */
.csp-product-page div.product .summary .price {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 22px;
    margin-bottom: 18px;
    background: linear-gradient(135deg, #0f3460 0%, #16213e 60%, #1a1a2e 100%);
    border-radius: 50px;
    box-shadow:
        0  6px 20px rgba(15,52,96,.4),
        0  2px  8px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.16);
    transition: transform .28s ease, box-shadow .28s ease;
    animation: cspPricePop .55s .1s cubic-bezier(.34,1.56,.64,1) both;
    position: relative;
}

.csp-product-page div.product .summary .price:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px rgba(15,52,96,.5), 0 4px 12px rgba(0,0,0,.2);
}

.csp-product-page div.product .summary .price ins {
    text-decoration: none;
}

.csp-product-page div.product .summary .price ins .amount,
.csp-product-page div.product .summary .price > .amount {
    color: #fff !important;
    font-size: 1.5em !important;
    font-weight: 800;
    text-shadow: 0 2px 5px rgba(0,0,0,.3);
}

.csp-product-page div.product .summary .price del {
    opacity: .7;
}

.csp-product-page div.product .summary .price del .amount {
    color: rgba(255,255,255,.6) !important;
    font-size: .9em !important;
}

/* ---- Short Description ---- */
.csp-product-page div.product .summary .woocommerce-product-details__short-description {
    padding: 14px 16px;
    margin-bottom: 18px;
    background: rgba(255,255,255,.8);
    border-left: 4px solid #0f3460;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,.04);
    animation: cspFadeUp .5s .15s both;
}

.csp-product-page div.product .summary .woocommerce-product-details__short-description p {
    margin: 0;
    color: #3a3a4a;
    line-height: 1.72;
    font-size: .96em;
}

/* ---- Category/Meta ---- */
.csp-product-page div.product .summary .product_meta {
    margin-top: 14px;
    padding: 10px 14px;
    background: linear-gradient(135deg, #eef2ff 0%, #e8f0fe 100%);
    border: 1px solid rgba(15,52,96,.1);
    border-radius: 8px;
    font-size: .88em;
    animation: cspFadeUp .5s .2s both;
}

.csp-product-page div.product .summary .product_meta > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-right: 10px;
    font-weight: 600;
    color: #1a1a2e;
}

.csp-product-page div.product .summary .product_meta a {
    color: #0f3460;
    font-weight: 700;
    transition: color .2s;
}

.csp-product-page div.product .summary .product_meta a:hover {
    color: #e94560;
}

/* ---- Add to Cart ---- */
.csp-product-page div.product .summary .single_add_to_cart_button {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 13px 32px !important;
    font-weight: 700 !important;
    letter-spacing: .5px;
    box-shadow: 0 6px 20px rgba(15,52,96,.38) !important;
    transition: transform .25s ease, box-shadow .25s ease !important;
    position: relative;
    overflow: hidden;
}

.csp-product-page div.product .summary .single_add_to_cart_button::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,.14) 0%, transparent 55%);
    pointer-events: none;
}

.csp-product-page div.product .summary .single_add_to_cart_button:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 12px 30px rgba(15,52,96,.5) !important;
}

/* ---------------------------------------------------------- */
/* Animations                                                 */
/* ---------------------------------------------------------- */
@keyframes cspTitleIn {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: translateY(0);     }
}

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

@keyframes cspPricePop {
    from { opacity: 0; transform: scale(.82); }
    to   { opacity: 1; transform: scale(1);   }
}

/* ---------------------------------------------------------- */
/* Full-width reset — all after-summary sections MUST clear  */
/* the float/flex image+summary row                          */
/* ---------------------------------------------------------- */
.csp-custom-description,
.csp-carousel-section,
.csp-custom-html,
.csp-checkout-headline {
    width: 100% !important;
    max-width: 100% !important;
    clear: both;
    float: none !important;
    flex-basis: 100% !important;
    flex-shrink: 0;
    box-sizing: border-box;
    align-self: auto;
}

/* ---------------------------------------------------------- */
/* Custom Description Section (replaces description tab)      */
/* ---------------------------------------------------------- */
.csp-custom-description {
    margin: 30px 0 10px;
    padding: 24px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    border: 1px solid rgba(15,52,96,.06);
    font-size: .97em;
    line-height: 1.75;
    color: #3a3a4a;
}

.csp-custom-description img {
    max-width: 100%;
    height: auto;
    border-radius: 0;
}

/* ---------------------------------------------------------- */
/* Urgency Text (after category)                              */
/* ---------------------------------------------------------- */
.csp-urgency-wrap {
    margin-top: 14px;
    padding: 11px 16px;
    border: 1px solid rgba(255,107,53,.25);
    border-radius: 8px;
    background: rgba(255,107,53,.04);
    position: relative;
    overflow: hidden;
}

/* Continuous shine sweep across the badge */
.csp-urgency-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 55%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    animation: cspUrgencySweep 3s ease-in-out infinite;
}

@keyframes cspUrgencySweep {
    0%    { left: -100%; opacity: 1; }
    45%   { left:  150%; opacity: 1; }
    45.1% { left: -100%; opacity: 0; }
    100%  { left: -100%; opacity: 0; }
}

.csp-urgency-text {
    display: block;
    font-size: .92em;
    font-weight: 700;
    text-align: center;
    position: relative;
    z-index: 1;
    background: linear-gradient(90deg, #ff4500 0%, #ff9800 25%, #ffdd00 50%, #ff9800 75%, #ff4500 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: cspFireShimmer 2.5s linear infinite, cspFireGlow 2s ease-in-out infinite;
    line-height: 1.45;
}

@keyframes cspFireShimmer {
    to { background-position: 200% center; }
}

@keyframes cspFireGlow {
    0%, 100% { filter: drop-shadow(0 0 2px rgba(255,107,53,.35)); }
    50%       { filter: drop-shadow(0 0 7px rgba(255,150,0,.85)); }
}

@supports not (-webkit-background-clip: text) {
    .csp-urgency-text {
        color: #ff6b35;
        -webkit-text-fill-color: unset;
    }
}

/* ---------------------------------------------------------- */
/* Checkout Headline — tight, close to "YOUR PRODUCTS"        */
/* ---------------------------------------------------------- */
.csp-checkout-headline {
    text-align: center;
    padding: 10px 20px 0;
    margin-bottom: 0;
}

.csp-checkout-headline h2 {
    display: inline-block;
    font-size: 1.55em;
    font-weight: 800;
    letter-spacing: -.3px;
    margin: 0 0 4px;
    background: linear-gradient(135deg, #0f3460 0%, #1a1a2e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(1px 2px 2px rgba(15,52,96,.18));
}

.csp-checkout-headline h2::after {
    content: '';
    display: block;
    width: 46px;
    height: 3px;
    margin: 4px auto 0;
    background: linear-gradient(90deg, #0f3460, #e94560);
    border-radius: 2px;
}

/* ---------------------------------------------------------- */
/* Image Carousel — multi-item filmstrip                      */
/* ---------------------------------------------------------- */
.csp-carousel-section {
    margin: 40px 0;
    background: #0d0d1a;
    border-radius: 14px;
    padding: 24px 0 16px;
    overflow: hidden;
}

/* Outer row: [arrow] [viewport] [arrow] */
.csp-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 0;
}

/* Scrollable area — clips slides */
.csp-carousel-viewport {
    flex: 1;
    overflow: hidden;
    min-width: 0;
}

.csp-carousel-track {
    display: flex;
    gap: 12px;
    padding: 0 4px;
    transition: transform .5s cubic-bezier(.25,.46,.45,.94);
    will-change: transform;
}

/* Each slide: 4 visible on desktop */
.csp-carousel-slide {
    flex: 0 0 calc(25% - 9px);
    min-width: 0;
    border-radius: 10px;
    overflow: hidden;
    background: #0d0d1a;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    transition: transform .3s ease, box-shadow .3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 500px; /* tall enough for portrait phone screenshots */
}

.csp-carousel-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain; /* show full image — no cropping */
    border-radius: 0;
}

.csp-carousel-slide:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,.55);
}

/* Navigation arrows — outside viewport */
.csp-carousel-btn {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,.3);
    background: rgba(255,255,255,.08);
    color: #fff;
    font-size: 1em;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .25s, border-color .25s, transform .2s;
    margin: 0 10px;
    flex-shrink: 0;
    line-height: 1;
    padding: 0;
    backdrop-filter: blur(4px);
}

.csp-carousel-btn:hover {
    background: rgba(255,255,255,.2);
    border-color: rgba(255,255,255,.7);
    transform: scale(1.12);
}

/* Dots */
.csp-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 14px;
    padding-bottom: 4px;
}

.csp-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255,255,255,.3);
    cursor: pointer;
    transition: background .3s, transform .3s;
}

.csp-dot.active,
.csp-dot:hover {
    background: #fff;
    transform: scale(1.45);
}

/* ---------------------------------------------------------- */
/* Custom HTML Sections                                        */
/* ---------------------------------------------------------- */
.csp-custom-html {
    margin: 40px 0;
    width: 100%;
}

/* ---------------------------------------------------------- */
/* Responsive                                                 */
/* ---------------------------------------------------------- */
/* ---------------------------------------------------------- */
/* Related Products — Buy Now button                          */
/* ---------------------------------------------------------- */
.woocommerce .related.products .add_to_cart_button,
.woocommerce .related.products .button.add_to_cart_button {
    background: linear-gradient(135deg, #0f3460 0%, #16213e 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 50px !important;
    font-weight: 700 !important;
    letter-spacing: .3px;
    box-shadow: 0 4px 14px rgba(15,52,96,.35) !important;
    transition: transform .22s ease, box-shadow .22s ease !important;
}

.woocommerce .related.products .add_to_cart_button:hover,
.woocommerce .related.products .button.add_to_cart_button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 22px rgba(15,52,96,.5) !important;
}

/* ---------------------------------------------------------- */
/* Responsive                                                 */
/* ---------------------------------------------------------- */
@media (max-width: 1024px) {
    .csp-carousel-slide {
        flex: 0 0 calc(33.333% - 8px);
        height: 480px;
    }
}

@media (max-width: 768px) {
    .csp-carousel-slide {
        flex: 0 0 calc(50% - 6px);
        height: 420px;
    }

    .csp-product-page div.product .summary {
        padding: 20px 16px 18px;
        border-radius: 10px;
    }

    .csp-product-page div.product .summary h1.product_title {
        font-size: 1.5em;
    }

    .csp-checkout-headline h2 {
        font-size: 1.3em;
    }

    .csp-carousel-btn {
        flex: 0 0 34px;
        width: 34px;
        height: 34px;
        font-size: .85em;
        margin: 0 6px;
    }
}

@media (max-width: 480px) {
    .csp-carousel-slide {
        flex: 0 0 calc(80% - 6px);
        height: 340px;
    }
}
