/*------------------------------------------------------------------
 [ Kimox — WooCommerce Single Product / Shop styling ]
 Scoped custom styles. Theme ships no styling for the product classes,
 so everything the single-product page needs lives here.
-------------------------------------------------------------------*/

.shop-area {
    --wc-accent: #22C55E;
    --wc-accent-dark: #16a34a;
    --wc-ink: #1a1c1e;
    --wc-body: #5b5f66;
    --wc-muted: #8a8f98;
    --wc-line: #e7eaee;
    --wc-soft: #f5f7f9;
    --wc-radius: 14px;
    --wc-shadow: 0 10px 40px rgba(20, 30, 45, 0.08);
    color: var(--wc-body);
}

.shop-area .woocommerce-wrapper {
    margin-bottom: 30px;
}

/*---------------------------------------
  Product top: two-column layout
----------------------------------------*/
.shop-area .product.row {
    --bs-gutter-x: 50px;
    align-items: flex-start;
    margin-bottom: 20px;
    margin-top: 30px;
}

/* Keep the summary in view while scrolling the gallery */
@media (min-width: 992px) {
    .shop-area .product.row > .col-lg-6:last-of-type {
        position: sticky;
        top: 30px;
    }
}

/*---------------------------------------
  Gallery
----------------------------------------*/
.product-details-thumb-wrapper {
    position: relative;
    background: var(--wc-soft);
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius);
    padding: 18px;
}

.product-details-thumb-wrapper .woocommerce-product-gallery__wrapper {
    margin: 0;
}

.product-details-active {
    border-radius: 10px;
    overflow: hidden;
}

.product-details-active .swiper-slide,
.product-details-thumb,
.woocommerce-product-gallery__image {
    height: 100%;
}

.product-details-thumb-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
}

/* Fallback when the gallery swiper is not (yet) initialised:
   show only the first image instead of a stacked column. */
.product-details-active:not(.swiper-initialized) .swiper-wrapper {
    display: block;
}
.product-details-active:not(.swiper-initialized) .swiper-slide:not(:first-child) {
    display: none;
}

/* Prev / next arrows */
.product-details-nav-button {
    position: absolute;
    inset: 0;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    z-index: 3;
}

.product-details-button-prev,
.product-details-button-next {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #fff;
    color: var(--wc-ink);
    box-shadow: 0 6px 18px rgba(20, 30, 45, 0.12);
    cursor: pointer;
    transition: all .25s ease;
}

.product-details-button-prev:hover,
.product-details-button-next:hover {
    background: var(--wc-accent);
    color: #fff;
}

/* Thumbnails row */
.product-details-thumb-bottom {
    margin-top: 16px;
}

.product-details-nav .swiper-slide,
.reallow-gallery-thumbnail-image {
    cursor: pointer;
}

.reallow-gallery-thumbnail-image button.custom-button {
    padding: 0;
    border: 2px solid transparent;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    width: 100%;
    transition: border-color .25s ease;
}

.product-details-nav .swiper-slide-thumb-active button.custom-button,
.reallow-gallery-thumbnail-image:hover button.custom-button {
    border-color: var(--wc-accent);
}

/* Sale badge */
.shop-area .onsale,
.product__details-offer {
    position: absolute;
    top: 26px;
    left: 26px;
    z-index: 4;
    background: var(--wc-accent);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    padding: 8px 12px;
    border-radius: 50px;
    margin: 0;
}

/*---------------------------------------
  Summary (right column)
----------------------------------------*/
.product-details-wrapper {
    padding-top: 4px;
}

.product-details-title {
    font-size: 34px;
    line-height: 1.2;
    font-weight: 700;
    color: var(--wc-ink);
    margin: 0 0 14px;
}

/* Rating */
.product-details-rating {
    gap: 10px;
    margin-bottom: 16px !important;
}

.product-details-rating .star-rating {
    overflow: hidden;
    position: relative;
    height: 1.2em;
    line-height: 1.2;
    font-size: 15px;
    width: 5.6em;
    letter-spacing: .12em;
    font-family: "Font Awesome 5 Pro";
    font-weight: 900;
    display: inline-block;
}
.product-details-rating .star-rating::before {
    content: "\f005\f005\f005\f005\f005";
    color: #d7dbe0;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    white-space: nowrap;
}
.product-details-rating .star-rating span {
    overflow: hidden;
    float: left;
    top: 0;
    left: 0;
    position: absolute;
    padding-top: 1.5em;
}
.product-details-rating .star-rating span::before {
    content: "\f005\f005\f005\f005\f005";
    top: 0;
    position: absolute;
    left: 0;
    color: #ffb332;
    white-space: nowrap;
}
.product-details-rating-count span {
    color: var(--wc-muted);
    font-size: 14px;
}

/* Inventory */
.product-details-inventory {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    margin-bottom: 18px !important;
}
.product-details-inventory .stock-availability {
    color: var(--wc-ink);
    font-weight: 600;
}
.product-details-inventory .in-stock {
    color: var(--wc-accent-dark);
    font-weight: 600;
}
.product-details-inventory .in-stock::before {
    content: "\2022";
    margin-right: 4px;
}
.product-details-inventory .out-stock {
    color: #e5484d;
    font-weight: 600;
}
.product-details-inventory .stock-quantity {
    color: var(--wc-muted);
}

/* Short description */
.short-description,
.woocommerce-product-details__short-description {
    color: var(--wc-body);
    font-size: 16px;
    line-height: 1.7;
    margin-bottom: 22px;
}
.short-description p:last-child {
    margin-bottom: 0;
}

/* Price */
.product-details-price {
    margin-bottom: 22px !important;
}
.product-details-price .price,
.product-details-wrapper .price {
    margin: 0;
    color: var(--wc-accent-dark);
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    gap: 12px;
    flex-wrap: wrap;
}
.product-details-price .price del {
    color: var(--wc-muted);
    font-weight: 500;
    font-size: 20px;
    opacity: .8;
}
.product-details-price .price ins {
    text-decoration: none;
}

/* Meta / query */
.product-details-query {
    border-top: 1px solid var(--wc-line);
    border-bottom: 1px solid var(--wc-line);
    padding: 18px 0;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.product-details-query-item {
    gap: 8px;
    font-size: 15px;
    flex-wrap: wrap;
}
.product-details-query-item span {
    color: var(--wc-ink);
    font-weight: 600;
    min-width: 90px;
    display: inline-block;
}
.product-details-query-item p,
.product-details-query-item a {
    margin: 0;
    color: var(--wc-body);
}
.product-details-query-item a {
    color: var(--wc-body);
    transition: color .2s ease;
}
.product-details-query-item a:hover {
    color: var(--wc-accent);
}

/*---------------------------------------
  Add to cart
----------------------------------------*/
.product-details-action {
    margin-bottom: 26px !important;
}
.product-details-action-inner {
    gap: 14px;
    flex-wrap: wrap;
}

/* Quantity stepper */
.product-details-quantity .quantity {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--wc-line);
    border-radius: 50px;
    overflow: hidden;
    background: #fff;
    height: 56px;
}
.product-details-quantity .quantity.hidden {
    display: none;
}
.product-details-quantity .qty_button {
    width: 48px;
    height: 100%;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: var(--wc-ink);
    font-size: 13px;
    transition: color .2s ease;
    user-select: none;
}
.product-details-quantity .qty_button:hover {
    color: var(--wc-accent);
}
.product-details-quantity input.qty {
    width: 46px;
    height: 100%;
    border: 0;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: var(--wc-ink);
    background: transparent;
    -moz-appearance: textfield;
}
.product-details-quantity input.qty::-webkit-outer-spin-button,
.product-details-quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Add to cart button */
.product-details-add-to-cart {
    flex: 1 1 auto;
}
.single_add_to_cart_button,
.product-add-cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 56px;
    padding: 0 34px;
    border: 0;
    border-radius: 50px;
    background: var(--wc-accent);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: .2px;
    cursor: pointer;
    transition: transform .2s ease, background .25s ease, box-shadow .25s ease;
    box-shadow: 0 8px 22px rgba(34, 197, 94, 0.28);
}
.single_add_to_cart_button:hover,
.product-add-cart-btn:hover {
    background: var(--wc-accent-dark);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.36);
}

/*---------------------------------------
  Share
----------------------------------------*/
.product-details-share {
    margin-bottom: 8px;
}
.product-details-share p {
    margin: 0;
    font-weight: 600;
    color: var(--wc-ink);
}
.product-details-share .bd-social ul {
    display: flex;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.product-details-share .bd-social ul li a {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--wc-soft);
    color: var(--wc-ink);
    border: 1px solid var(--wc-line);
    transition: all .25s ease;
}
.product-details-share .bd-social ul li a:hover {
    background: var(--wc-accent);
    border-color: var(--wc-accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Payment / safe checkout card */
.product-details-checkout-card {
    border: 1px dashed var(--wc-line);
    border-radius: var(--wc-radius);
    padding: 16px 18px;
    background: var(--wc-soft);
}
.product-details-checkout-card p {
    margin: 0 0 10px;
    font-weight: 600;
    color: var(--wc-ink);
    font-size: 14px;
}
.product-details-checkout-card .checkout-card img {
    max-width: 100%;
    height: auto;
}

/*---------------------------------------
  Tabs
----------------------------------------*/
.product-details-bottom {
    margin-top: 20px;
}
.product-details-tab .nav-pills {
    gap: 10px;
    border-bottom: 1px solid var(--wc-line);
    padding-bottom: 0;
    margin-bottom: 30px !important;
}
.product-details-tab .nav-pills .nav-link {
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--wc-muted);
    font-size: 16px;
    font-weight: 600;
    padding: 12px 6px;
    position: relative;
}
.product-details-tab .nav-pills .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 100%;
    height: 2px;
    background: var(--wc-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .25s ease;
}
.product-details-tab .nav-pills .nav-link:hover {
    color: var(--wc-ink);
}
.product-details-tab .nav-pills .nav-link.active {
    background: transparent;
    color: var(--wc-ink);
}
.product-details-tab .nav-pills .nav-link.active::after {
    transform: scaleX(1);
}

.product-details-description {
    color: var(--wc-body);
    font-size: 16px;
    line-height: 1.8;
}
.product-details-description h1,
.product-details-description h2,
.product-details-description h3,
.product-details-description h4 {
    color: var(--wc-ink);
    margin-top: 1.4em;
}
.product-details-description img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Additional information table */
.product-details-description .woocommerce-product-attributes,
.product-details-description table.shop_attributes {
    width: 100%;
    border-collapse: collapse;
}
.product-details-description table.shop_attributes th,
.product-details-description table.shop_attributes td {
    border: 1px solid var(--wc-line);
    padding: 12px 16px;
    text-align: left;
    font-size: 15px;
}
.product-details-description table.shop_attributes th {
    background: var(--wc-soft);
    color: var(--wc-ink);
    font-weight: 600;
    width: 28%;
}

/* Reviews */
.woocommerce-Reviews .comment-form input:not([type=checkbox]):not([type=submit]),
.woocommerce-Reviews .comment-form textarea {
    width: 100%;
    border: 1px solid var(--wc-line);
    border-radius: 10px;
    padding: 12px 16px;
    margin-top: 6px;
    background: #fff;
}
.woocommerce-Reviews .comment-form textarea {
    min-height: 120px;
}

/*---------------------------------------
  Related products
----------------------------------------*/
.related-products {
    margin-top: 60px;
    padding-top: 50px;
    border-top: 1px solid var(--wc-line);
}
.related-products .section-title-wrapper {
    margin-bottom: 34px;
}
.related-products .section-title-wrapper .title {
    font-size: 30px;
    font-weight: 700;
    color: var(--wc-ink);
    margin: 0;
}

.related-products .product-wrapper {
    background: #fff;
    border: 1px solid var(--wc-line);
    border-radius: var(--wc-radius);
    overflow: hidden;
    transition: box-shadow .3s ease, transform .3s ease, border-color .3s ease;
    height: 100%;
}
.related-products .product-wrapper:hover {
    box-shadow: var(--wc-shadow);
    transform: translateY(-4px);
    border-color: transparent;
}
.related-products .product-image-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--wc-soft);
}
.related-products .product-image-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .5s ease;
}
.related-products .product-wrapper:hover .product-image-wrapper img {
    transform: scale(1.05);
}
.related-products .product-content {
    padding: 18px 20px 22px;
}
.related-products .product-title,
.related-products .bd-product-title {
    font-size: 17px;
    font-weight: 600;
    margin: 0 0 8px;
}
.related-products .product-title a,
.related-products .bd-product-title a {
    color: var(--wc-ink);
    transition: color .2s ease;
}
.related-products .product-title a:hover,
.related-products .bd-product-title a:hover {
    color: var(--wc-accent);
}
.related-products .product-price .price,
.related-products .product-price {
    color: var(--wc-accent-dark);
    font-weight: 700;
    font-size: 18px;
}
.related-products .product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    z-index: 2;
}

/*---------------------------------------
  Responsive
----------------------------------------*/
@media (max-width: 991px) {
    .shop-area .product.row {
        --bs-gutter-x: 30px;
    }
    .product-details-thumb-wrapper {
        margin-bottom: 30px;
    }
    .product-details-title {
        font-size: 28px;
    }
}

@media (max-width: 575px) {
    .product-details-title {
        font-size: 24px;
    }
    .product-details-price .price,
    .product-details-wrapper .price {
        font-size: 26px;
    }
    .product-details-action-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .product-details-quantity .quantity {
        width: 100%;
        justify-content: space-between;
    }
    .product-details-quantity input.qty {
        flex: 1;
    }
}
