/* =========================================================
   KENSUI LIFECARE — PRODUCT DETAILS
   FINAL CLEAN RESPONSIVE CSS
   ========================================================= */

/* ---------------------------------------------------------
   GLOBAL SAFETY
--------------------------------------------------------- */

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

*,
*::before,
*::after {
    box-sizing: border-box;
}


/* ---------------------------------------------------------
   INNER HERO
--------------------------------------------------------- */

.inner-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;

    padding: 42px 0 32px;
    margin-bottom: 8px;

    background:
        radial-gradient(circle, rgba(255,255,255,.65) 0 3px, transparent 4px) 8% 18% / 100px 100px,
        radial-gradient(circle, rgba(255,255,255,.45) 0 4px, transparent 5px) 22% 72% / 130px 130px,
        radial-gradient(circle, rgba(255,255,255,.55) 0 3px, transparent 4px) 35% 25% / 150px 150px,
        radial-gradient(circle, rgba(255,255,255,.40) 0 5px, transparent 6px) 48% 80% / 120px 120px,
        radial-gradient(circle, rgba(255,255,255,.60) 0 3px, transparent 4px) 62% 18% / 140px 140px,
        radial-gradient(circle, rgba(255,255,255,.45) 0 4px, transparent 5px) 74% 65% / 110px 110px,
        radial-gradient(circle, rgba(255,255,255,.55) 0 3px, transparent 4px) 88% 25% / 130px 130px,
        radial-gradient(circle, rgba(255,255,255,.40) 0 5px, transparent 6px) 94% 82% / 150px 150px,
        linear-gradient(
            115deg,
            #e9f6f8 0%,
            #d7eff2 15%,
            #b5e4e6 30%,
            #73cbd0 45%,
            #03ad9b 60%,
            #1594aa 75%,
            #0878a5 100%
        );

    background-repeat: no-repeat;
}

.inner-hero::before,
.inner-hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.inner-hero::before {
    width: 90px;
    height: 90px;
    top: 8%;
    left: 8%;

    background: radial-gradient(
        circle at 30% 25%,
        rgba(255,255,255,.75),
        rgba(255,255,255,.18) 40%,
        rgba(255,255,255,.03) 70%,
        transparent 72%
    );

    box-shadow: 0 0 35px rgba(255,255,255,.18);
    animation: heroBallOne 11s ease-in-out infinite alternate;
}

.inner-hero::after {
    width: 140px;
    height: 140px;
    right: 7%;
    bottom: 8%;

    background: radial-gradient(
        circle at 30% 25%,
        rgba(255,255,255,.65),
        rgba(255,255,255,.14) 40%,
        rgba(255,255,255,.02) 70%,
        transparent 72%
    );

    box-shadow: 0 0 45px rgba(255,255,255,.15);
    animation: heroBallTwo 14s ease-in-out infinite alternate;
}

.inner-hero .kicker {
    position: relative;
    display: inline-flex;
    align-items: center;

    margin: 0 0 9px 28px;

    color: #3977ff;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 1.7px;
}

.inner-hero .kicker::before {
    content: "";
    width: 22px;
    height: 2px;
    margin-right: 8px;

    border-radius: 999px;
    background: #3977ff;
}

.inner-hero h1 {
    position: relative;

    margin: 0 35px;

    color: #606060;
    font-size: clamp(30px, 4vw, 48px);
    line-height: 1.08;
    font-weight: 850;
    letter-spacing: -1.5px;

    overflow-wrap: anywhere;
}

.inner-hero p {
    position: relative;

    max-width: 560px;
    margin: 10px 0 0 25px;

    color: #718097;
    font-size: 13px;
    line-height: 1.65;
}


/* ---------------------------------------------------------
   PRODUCT PAGE WRAPPER
--------------------------------------------------------- */

main.section.product-page {
    width: 100%;
    max-width: 1200px;

    margin: 0 auto;
    padding: 25px 20px 80px;

    box-sizing: border-box;
}

.product-page > .back-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;

    margin: 0 0 30px;

    color: #555;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;

    text-decoration: none;
    opacity: .8;

    transition:
        opacity .2s ease,
        color .2s ease,
        transform .2s ease;
}

.product-page > .back-link:hover {
    color: #04A69D;
    opacity: 1;
    transform: translateX(-3px);
}


/* ---------------------------------------------------------
   MAIN PRODUCT LAYOUT
--------------------------------------------------------- */

.product-detail {
    display: grid;

    grid-template-columns:
        minmax(0, 1.05fr)
        minmax(0, .95fr);

    gap: 55px;

    width: 100%;
    max-width: 1180px;

    margin: 0 auto;

    align-items: start;
}


/* ---------------------------------------------------------
   PRODUCT GALLERY
--------------------------------------------------------- */

.detail-media {
    width: 100%;
    min-width: 0;

    padding: 20px;

    background: #f8f9fb;
    border-radius: 24px;

    box-sizing: border-box;
}

.main-product-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 520px;
    min-height: 0;

    padding: 10px;

    background: #fff;
    border-radius: 18px;

    overflow: hidden;
}

.main-product-image img,
.main-product-image img#mainProductImage {
    display: block;

    width: 100% !important;
    height: 100% !important;

    max-width: 100% !important;
    max-height: 100% !important;

    object-fit: contain;
    object-position: center;

    border-radius: 12px;

    transition: transform .35s ease;
}

.main-product-image:hover img {
    transform: scale(1.04);
}


/* ---------------------------------------------------------
   THUMBNAILS
--------------------------------------------------------- */

.product-thumbnails {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;

    gap: 10px;

    width: 100%;

    margin-top: 14px;
    padding: 3px;

    overflow-x: auto;
    overflow-y: hidden;

    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.product-thumbnail {
    flex: 0 0 78px;

    width: 78px;
    height: 78px;

    min-width: 78px;
    min-height: 78px;

    padding: 4px;

    background: #fff;
    border: 2px solid transparent;
    border-radius: 12px;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        transform .2s ease;
}

.product-thumbnail img {
    display: block;

    width: 100% !important;
    height: 100% !important;

    object-fit: contain;
    border-radius: 8px;
}

.product-thumbnail:hover,
.product-thumbnail.active,
.product-thumbnail[aria-selected="true"] {
    border-color: #04A69D;
    box-shadow: 0 5px 14px rgba(0,0,0,.08);
}

.product-thumbnail:hover {
    transform: translateY(-2px);
}

.no-product-image {
    width: 100%;
    height: 520px;

    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;

    background: #f5f6f8;
    border-radius: 18px;
    color: #999;
}

.no-product-image i {
    font-size: 50px;
}


/* ---------------------------------------------------------
   PRODUCT INFORMATION
--------------------------------------------------------- */

.detail-copy {
    width: 100%;
    min-width: 0;

    padding-top: 10px;

    box-sizing: border-box;
}

.product-category {
    display: inline-block;

    margin-bottom: 12px;

    color: #04A69D;
    font-size: 13px;
    font-weight: 700;

    text-transform: uppercase;
    letter-spacing: 1px;
}

.detail-copy h1 {
    margin: 0 0 14px;

    color: #171717;

    font-size: clamp(30px, 4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -.03em;

    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   RATING
--------------------------------------------------------- */

.product-rating {
    display: flex;
    align-items: center;
    flex-wrap: wrap;

    gap: 8px;

    margin: 18px 0 24px;

    font-size: 14px;
}

.stars {
    color: #ffb400;
    font-size: 17px;
    letter-spacing: 2px;
}

.product-rating strong {
    color: #222;
}

.rating-text {
    color: #888;
}


/* ---------------------------------------------------------
   DESCRIPTION
--------------------------------------------------------- */

.product-description {
    width: 100%;
    max-width: 100%;

    margin-bottom: 25px;

    color: #666;
    font-size: 15px;
    line-height: 1.8;

    overflow-wrap: break-word;
    word-wrap: break-word;
}

.product-description img,
.product-description iframe,
.product-description video {
    max-width: 100%;
}

.product-description img {
    height: auto !important;
}

.product-description table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

.product-description ul {
    list-style: none;

    padding: 0;
    margin: 0;
}

.product-description ul li {
    position: relative;

    padding-left: 28px;
    margin-bottom: 10px;
}

.product-description ul li::before {
    content: "\f00c";

    position: absolute;
    left: 0;
    top: 2px;

    font-family: "Font Awesome 6 Free";
    font-weight: 900;

    color: #0162B2;
    font-size: 14px;
}

.product-description strong {
    color: #28a745;
}

.product-description ul li strong {
    color: #04A69D;
}


/* ---------------------------------------------------------
   PRODUCT HIGHLIGHTS TITLE
--------------------------------------------------------- */

.product-highlights-title {
    position: relative;

    margin: 0 0 20px;
    padding-bottom: 12px;

    color: #222;

    font-size: 22px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .2px;
}

.product-highlights-title::after {
    content: "";

    position: absolute;
    left: 0;
    bottom: 0;

    width: 45px;
    height: 3px;

    background: #f7941d;
    border-radius: 10px;
}


/* ---------------------------------------------------------
   PRICE
--------------------------------------------------------- */

.detail-price {
    display: flex;
    flex-direction: column;
    gap: 5px;

    margin: 24px 0 25px;
}

.price-label {
    color: #888;
    font-size: 13px;
}

.detail-price strong {
    color: #ff6b00;

    font-size: 32px;
    line-height: 1;
    font-weight: 800;
}


/* ---------------------------------------------------------
   PURCHASE AREA
--------------------------------------------------------- */

.detail-purchase {
    width: 100%;
    max-width: 100%;
}

.detail-purchase .purchase-form {
    display: flex;
    align-items: flex-end;

    gap: 15px;

    width: 100%;
    max-width: 100%;
}


/* ---------------------------------------------------------
   QUANTITY
--------------------------------------------------------- */

.quantity-section {
    flex: 0 0 auto;
    margin: 0;
}

.quantity-section > label {
    display: block;

    margin-bottom: 9px;

    color: #333;
    font-size: 14px;
    font-weight: 600;
}

.quantity-control {
    display: flex;
    align-items: stretch;

    width: 150px;
    height: 56px;

    border: 1px solid #ddd;
    border-radius: 14px;

    overflow: hidden;

    background: #fff;
}

.quantity-btn {
    flex: 0 0 42px;

    width: 42px;
    height: 100%;

    padding: 0;
    border: 0;

    background: #f7f7f7;
    color: #333;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    transition:
        background .2s ease,
        color .2s ease;
}

.quantity-btn:hover {
    background: #04A69D;
    color: #fff;
}

.quantity-control input {
    flex: 1 1 auto;

    width: 66px;
    min-width: 0;
    height: 100%;

    padding: 0;
    margin: 0;

    border: 0;
    outline: none;

    background: #fff;
    color: #222;

    text-align: center;
    font-size: 16px;
    font-weight: 600;

    -webkit-appearance: textfield;
    appearance: textfield;
}

.quantity-control input::-webkit-inner-spin-button,
.quantity-control input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity-section small {
    display: block;

    margin-top: 7px;

    color: #777;
    font-size: 12px;
}


/* ---------------------------------------------------------
   ADD TO CART
--------------------------------------------------------- */

.detail-add-cart {
    flex: 1 1 auto;

    width: auto;
    min-width: 0;
    min-height: 56px;

    padding: 0 20px;

    border: 0;
    border-radius: 14px;

    background: #04A69D !important;
    color: #fff !important;

    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    font-size: 16px;
    font-weight: 600;

    cursor: pointer;

    box-shadow: 0 8px 20px rgba(4,166,157,.20);

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.detail-add-cart:hover {
    background: #038F87 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(4,166,157,.30);
}

.detail-add-cart:active {
    transform: translateY(0);
}

.detail-out-stock {
    width: 100%;
    min-height: 56px;

    border: 0;
    border-radius: 14px;

    background: #e9e9e9;
    color: #888;

    font-size: 16px;
    font-weight: 600;
}


/* ---------------------------------------------------------
   TRUST INFORMATION
--------------------------------------------------------- */

.product-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 10px;

    margin-top: 25px;
    padding-top: 20px;

    border-top: 1px solid #eee;
}

.product-trust div {
    display: flex;
    align-items: center;
    gap: 7px;

    min-width: 0;

    color: #666;
    font-size: 12px;
}

.product-trust i {
    flex: 0 0 auto;

    color: #04A69D;
    font-size: 15px;
}


/* ---------------------------------------------------------
   VIEW CART
--------------------------------------------------------- */

.view-cart-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 20px;

    color: #222;
    font-size: 14px;
    font-weight: 600;

    text-decoration: none;

    transition: color .2s ease;
}

.view-cart-link:hover {
    color: #04A69D;
}


/* ---------------------------------------------------------
   OPTIONAL SIZE CONTROL
--------------------------------------------------------- */

.size-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    margin-bottom: 0;
}

.size-section label {
    display: block;

    margin-bottom: 8px;

    color: #222;
    font-size: 14px;
    font-weight: 600;
}

.size-select {
    width: 140px;
    height: 54px;

    padding: 0 12px;

    border: 1px solid #ddd;
    border-radius: 6px;

    background: #fff;
    color: #333;

    font-size: 15px;

    cursor: pointer;
    outline: none;
}

.size-select:focus {
    border-color: #0162B2;
    box-shadow: 0 0 0 2px rgba(1,98,178,.08);
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 991px) {

    .inner-hero {
        padding: 36px 0 28px;
    }

    .inner-hero h1 {
        font-size: clamp(28px, 5vw, 42px);
    }

    main.section.product-page {
        padding: 24px 24px 70px;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .detail-media,
    .detail-copy {
        width: 100%;
        max-width: 800px;
        margin-left: auto;
        margin-right: auto;
    }

    .main-product-image,
    .no-product-image {
        height: 500px;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 767px) {

    .inner-hero {
        padding: 28px 15px 24px;
    }

    .inner-hero .kicker {
        margin-left: 0;
    }

    .inner-hero h1 {
        margin: 0;
        font-size: 30px;
        line-height: 1.15;
        letter-spacing: -.8px;
    }

    .inner-hero p {
        margin: 8px 0 0;
        font-size: 12px;
    }

    main.section.product-page {
        padding: 20px 15px 55px !important;
    }

    .product-page > .back-link {
        margin-bottom: 18px;
        font-size: 13px;
    }

    .product-detail {
        display: flex;
        flex-direction: column;
        gap: 28px;
    }

    .detail-media {
        padding: 8px;
        border-radius: 18px;
    }

    .main-product-image {
        width: 100%;
        height: auto;
        min-height: 0;

        aspect-ratio: 1 / 1;

        padding: 8px;

        border-radius: 14px;
    }

    .main-product-image img,
    .main-product-image img#mainProductImage {
        width: 100% !important;
        height: 100% !important;

        max-width: 100% !important;
        max-height: 100% !important;

        object-fit: contain;
    }

    .no-product-image {
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .product-thumbnails {
        gap: 8px;
        margin-top: 10px;
        padding: 2px;

        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .product-thumbnail {
        flex: 0 0 65px;

        width: 65px;
        height: 65px;

        min-width: 65px;
        min-height: 65px;
    }

    .detail-copy {
        padding-top: 0;
    }

    .product-category {
        margin-bottom: 8px;
        font-size: 11px;
    }

    .detail-copy h1 {
        margin-bottom: 10px;
        font-size: 29px;
        line-height: 1.2;
    }

    .product-rating {
        margin: 12px 0 18px;
        gap: 6px;
        font-size: 13px;
    }

    .stars {
        font-size: 15px;
    }

    .rating-text {
        font-size: 12px;
    }

    .product-description {
        margin-bottom: 20px;
        font-size: 14px;
        line-height: 1.7;
    }

    .product-highlights-title {
        margin-bottom: 16px;
        font-size: 19px;
    }

    .product-description ul li {
        padding-left: 24px;
        margin-bottom: 9px;
    }

    .detail-price {
        margin: 20px 0;
    }

    .detail-price strong {
        font-size: 28px;
    }

    .detail-purchase .purchase-form {
        display: flex;
        flex-direction: column;
        align-items: stretch;

        gap: 14px;
    }

    .quantity-section {
        width: 100%;
    }

    .quantity-section > label {
        margin-bottom: 7px;
        font-size: 13px;
    }

    .quantity-control {
        width: 150px;
        height: 52px;
    }

    .detail-add-cart {
        width: 100% !important;
        min-height: 54px;

        flex: none !important;

        border-radius: 12px;

        font-size: 15px;
    }

    .product-trust {
        grid-template-columns: 1fr;
        gap: 12px;

        margin-top: 20px;
        padding-top: 16px;
    }

    .product-trust div {
        font-size: 13px;
    }

    .view-cart-link {
        margin-top: 16px;
        font-size: 13px;
    }
}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {

    .inner-hero {
        padding: 24px 12px 21px;
    }

    .inner-hero h1 {
        font-size: 27px;
    }

    main.section.product-page {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }

    .product-detail {
        gap: 24px;
    }

    .detail-media {
        padding: 6px;
        border-radius: 16px;
    }

    .main-product-image {
        border-radius: 13px;
    }

    .product-thumbnail {
        flex: 0 0 58px;

        width: 58px;
        height: 58px;

        min-width: 58px;
        min-height: 58px;
    }

    .detail-copy h1 {
        font-size: 26px;
    }

    .product-description {
        font-size: 13.5px;
    }

    .product-highlights-title {
        font-size: 18px;
    }

    .detail-price strong {
        font-size: 26px;
    }

    .quantity-control {
        width: 145px;
        height: 50px;
    }

    .detail-add-cart {
        min-height: 52px;
    }
}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 360px) {

    .inner-hero h1 {
        font-size: 24px;
    }

    main.section.product-page {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .product-thumbnail {
        flex: 0 0 52px;

        width: 52px;
        height: 52px;

        min-width: 52px;
        min-height: 52px;
    }

    .quantity-control {
        width: 140px;
    }
}


/* ---------------------------------------------------------
   HERO ANIMATIONS
--------------------------------------------------------- */

@keyframes heroBallOne {
    0% {
        transform: translate(0, 20px) scale(.85);
    }

    25% {
        transform: translate(100px, -20px) scale(1);
    }

    50% {
        transform: translate(180px, 50px) scale(1.08);
    }

    75% {
        transform: translate(100px, 100px) scale(.92);
    }

    100% {
        transform: translate(-20px, 60px) scale(1.05);
    }
}

@keyframes heroBallTwo {
    0% {
        transform: translate(0, 0) scale(1);
    }

    30% {
        transform: translate(-100px, -60px) scale(1.1);
    }

    60% {
        transform: translate(-180px, 20px) scale(.9);
    }

    100% {
        transform: translate(-70px, 100px) scale(1.05);
    }
}


/* ---------------------------------------------------------
   REDUCE MOTION
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

    .inner-hero::before,
    .inner-hero::after,
    .main-product-image img,
    .product-thumbnail,
    .detail-add-cart {
        animation: none !important;
        transition: none !important;
    }
}
