/**
 * Product Detail Page - Match Xám Sneaker
 * Theme: Koi Sneaker
 */

/* ===========================
   SINGLE PRODUCT LAYOUT
   =========================== */

.single-product .product-main {
    padding: 30px 0;
    margin-left: 0;
    margin-right: 0;
}

.single-product .product-main .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
    display: flex;
    flex-wrap: wrap;
}

.single-product .large-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 15px;
}

/* ===========================
   PRODUCT GALLERY
   =========================== */

.single-product .product-gallery {
    position: relative;
}

.single-product .woocommerce-product-gallery {
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
}

.single-product .woocommerce-product-gallery__image {
    margin: 0;
}

.single-product .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Sale Badge */
.single-product .product-main .badge-container {
    margin: -10px 5px 5px;
}

.single-product .product-main .badge-container .badge-inner {
    background: transparent;
}

.single-product .product-main .badge-container .badge-inner span {
    background: #ff0000;
    padding: 5px 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
    border-radius: 5px;
    display: inline-block;
}

/* Thumbnails */
.single-product .flex-control-thumbs {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.single-product .flex-control-thumbs li {
    flex: 0 0 auto;
    width: 80px;
    list-style: none;
}

.single-product .flex-control-thumbs li img {
    border: 1px solid #e3e3e3;
    cursor: pointer;
    border-radius: 4px;
}

.single-product .flex-control-thumbs li:hover img,
.single-product .flex-control-thumbs li.flex-active img {
    border-color: #252a28;
}

/* ===========================
   PRODUCT INFO
   =========================== */

.single-product .product-info {
    padding: 0;
}

/* Brand Logo */
.single-product .product-info .pwb-single-product-brands a img {
    max-width: 75px;
    margin-bottom: 10px;
}

/* Product Title */
.single-product .product-info .product-title,
.single-product .product_title {
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 18px;
    color: #303030;
    font-weight: 500;
    line-height: 1.4;
}

/* Product Price */
.single-product .product-info .price,
.single-product .price {
    margin-bottom: 15px;
    font-size: 16px;
}

.single-product .product-info .price del span,
.single-product .price del span {
    font-size: 14px;
    color: #999;
    text-decoration: line-through;
}

.single-product .product-info .price ins span,
.single-product .price ins span {
    font-size: 19px;
    color: #ff0000;
    font-weight: 500;
    text-decoration: none;
}

/* Product Meta */
.single-product .product_meta {
    clear: both;
    margin-bottom: 15px;
    padding: 15px 0;
    border-top: 1px solid #e3e3e3;
    font-size: 14px;
}

.single-product .product_meta > span {
    display: block;
    margin-bottom: 8px;
}

.single-product .product_meta .sku_wrapper,
.single-product .product_meta .posted_in,
.single-product .product_meta .tagged_as {
    color: #666;
}

.single-product .product_meta a {
    color: #252a28;
    text-decoration: none;
}

.single-product .product_meta a:hover {
    color: #d70018;
}

/* Thông Báo Box */
.single-product .thong-bao {
    margin-bottom: 20px;
    background: #fafafa;
    padding: 10px 15px;
    color: #464646;
    font-size: 16px;
    border-left: 3px solid #252a28;
    border-radius: 4px;
}

.single-product .thong-bao p {
    margin-bottom: 5px;
    line-height: 1.6;
}

.single-product .thong-bao ul {
    margin: 0;
    padding-left: 20px;
}

.single-product .thong-bao ul li {
    margin-bottom: 0.2em;
}

/* ===========================
   PRODUCT FORM
   =========================== */

.single-product .cart {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

/* Quantity */
.single-product .quantity {
    margin-bottom: 0;
    margin-right: 10px;
}

.single-product .quantity .qty {
    width: 60px;
    height: 45px;
    padding: 0 10px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    text-align: center;
    font-size: 16px;
}

/* Add to Cart Button */
.single-product .single_add_to_cart_button {
    margin-right: 0;
    font-size: 16px;
    border-radius: 4px;
    background: #252a28;
    color: #fff;
    text-transform: uppercase;
    padding: 12px 30px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.single-product .single_add_to_cart_button:hover {
    background: #000;
}

/* Buy Now Button */
.buy_now_button {
    display: inline-block;
    overflow: hidden;
    clear: both;
    border-radius: 4px;
    font-size: 16px;
    line-height: normal;
    text-transform: uppercase;
    color: #fff !important;
    text-align: center;
    background: linear-gradient(top, #f59000, #fd6e1d);
    margin: 10px 10px 17px;
    text-decoration: none;
    border-bottom: 0 !important;
    max-width: 350px;
    padding: 10px 10px 12px 10px;
}

.buy_now_button:hover {
    background: linear-gradient(top, #fd6e1d, #f59000);
}

/* Variations */
.single-product .variations {
    margin-bottom: 20px;
    border: none;
}

.single-product .variations tbody {
    border: none;
}

.single-product .variations tr {
    border: none;
}

.single-product .variations th,
.single-product .variations td {
    padding: 0.5em 0 !important;
    vertical-align: top;
    border: none;
}

.single-product .variations td.label {
    padding-right: 15px !important;
}

.single-product .variations label {
    font-size: 15px;
    margin-bottom: 0.8em;
    font-weight: 600;
    display: block;
}

.single-product .variations select {
    display: none !important;
}

/* Hidden select - WooCommerce uses this */
.single-product .variations td.value {
    position: relative;
}

.single-product .variations td.value > select {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 1px;
    height: 1px;
}

/* Radio Buttons Style - Match Xám Sneaker */
.radio-buttons-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.radio-button-label {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.radio-button-label input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.radio-button-text {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
    user-select: none;
}

.radio-button-label:hover .radio-button-text {
    border-color: #252a28;
    background: #f8f8f8;
}

.radio-button-label input[type="radio"]:checked + .radio-button-text {
    border-color: #252a28;
    background: #252a28;
    color: #fff;
    font-weight: 700;
}

.radio-button-label input[type="radio"]:disabled + .radio-button-text {
    opacity: 0.5;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Reset Variations Link */
.reset_variations {
    display: inline-block;
    margin-left: 10px;
    font-size: 13px;
    color: #d70018;
    text-decoration: none;
}

.reset_variations:hover {
    text-decoration: underline;
}

/* ===========================
   PRODUCT TABS
   =========================== */

.single-product .woocommerce-tabs {
    margin-top: 40px;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
    overflow: hidden;
}

.single-product .woocommerce-tabs .tabs {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    background: #f8f8f8;
    border-bottom: 1px solid #e3e3e3;
}

.single-product .woocommerce-tabs .tabs li {
    margin: 0 !important;
    border-right: 1px solid #e3e3e3;
    flex: 1;
}

.single-product .woocommerce-tabs .tabs li:last-child {
    border-right: none;
}

.single-product .woocommerce-tabs .tabs li a {
    display: block;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.3s ease;
}

.single-product .woocommerce-tabs .tabs li.active a,
.single-product .woocommerce-tabs .tabs li:hover a {
    background: #252a28;
    color: #fff;
}

.single-product .woocommerce-tabs .panel {
    padding: 20px;
}

.single-product .tab-panels .entry-content p {
    margin-bottom: 8px;
    line-height: 1.8;
}

/* ===========================
   RELATED PRODUCTS
   =========================== */

.single-product .related {
    margin-top: 50px;
    padding: 20px;
    border: 1px solid #ececec;
    border-radius: 4px;
}

.single-product .related .product-section-title,
.single-product .related h2 {
    margin-bottom: 20px;
    padding: 10px;
    border-bottom: 1px solid #ececec;
    letter-spacing: 0;
    text-transform: none;
    font-size: 19px;
    font-weight: 600;
}

.single-product .related .products {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.single-product .related .product {
    border: 1px solid #ececec;
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.single-product .related .product:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-3px);
}

.single-product .related .product img {
    width: 100%;
    height: auto;
}

.single-product .related .woocommerce-loop-product__title {
    font-size: 14px;
    padding: 10px;
    min-height: 60px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.single-product .related .price {
    padding: 0 10px 10px;
    font-size: 16px;
}

/* ===========================
   PRODUCT SIDEBAR (if exists)
   =========================== */

.single-product #product-sidebar {
    flex-basis: 20%;
    max-width: 20%;
    padding-left: 20px;
}

.single-product #product-sidebar .widget {
    border: 1px solid #e3e3e3;
    border-top: 3px solid #252a28;
    margin-bottom: 20px;
    border-radius: 4px;
    overflow: hidden;
}

.single-product #product-sidebar .widget-title {
    text-transform: none !important;
    letter-spacing: 0 !important;
    padding: 10px;
    display: block;
    border-bottom: 1px solid #e3e3e3;
    background: #f8f8f8;
    font-size: 16px;
    font-weight: 600;
}

.single-product #product-sidebar .widget ul {
    padding: 10px;
}

.single-product #product-sidebar .widget li {
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
}

.single-product #product-sidebar .widget li:last-child {
    border-bottom: none;
}

/* ===========================
   BREADCRUMB
   =========================== */

.single-product .woocommerce-breadcrumb {
    padding: 20px 0;
    font-size: 13px;
    color: #666;
}

.single-product .woocommerce-breadcrumb a {
    color: #252a28;
    text-decoration: none;
}

.single-product .woocommerce-breadcrumb a:hover {
    color: #252a28;
    text-decoration: underline;
}

/* ===========================
   RESPONSIVE
   =========================== */

@media (max-width: 1024px) {
    .single-product .related .products {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .single-product .large-6 {
        flex: 0 0 100%;
        max-width: 100%;
        padding: 0 15px;
    }
    
    .single-product .product-main {
        padding: 20px 0;
    }
    
    .single-product .related .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .single-product .cart {
        text-align: center;
        justify-content: center;
    }
    
    .buy_now_button {
        width: 100%;
        margin: 12px 0 17px !important;
    }
}

@media (max-width: 549px) {
    .single-product .related .products {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .single-product .product_title {
        font-size: 16px;
    }
    
    .single-product .price ins span {
        font-size: 17px;
    }
}

/* ===========================
   ADDITIONAL ELEMENTS
   =========================== */

/* Rating Stars */
.single-product .woocommerce-product-rating {
    margin-bottom: 15px;
}

.single-product .star-rating {
    color: #ffa500;
}

/* Stock Status */
.single-product .stock {
    margin-bottom: 15px;
    font-weight: 600;
}

.single-product .stock.in-stock {
    color: #7a9c59;
}

.single-product .stock.out-of-stock {
    color: #b20000;
}

/* Product Description */
.single-product .woocommerce-product-details__short-description {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #666;
}

/* Social Share */
.single-product .social-icons {
    margin-top: 20px;
    display: flex;
    gap: 10px;
}

.single-product .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #d7d7d7 !important;
    border-radius: 50%;
    color: #666;
    transition: all 0.3s ease;
}

.single-product .social-icons a:hover {
    background: #252a28;
    color: #fff;
    border-color: #252a28 !important;
}

/* Image Tools */
.single-product .image-tools a {
    border: 1px solid #d6d6d6 !important;
    padding: 8px 12px;
    border-radius: 4px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.single-product .image-tools a:hover {
    background: #252a28;
    color: #fff;
    border-color: #252a28 !important;
}

/* ===========================
   UTILITIES
   =========================== */

.single-product .is-divider {
    display: none;
}

.aligncenter {
    clear: both;
    display: block;
    margin: 0 auto;
}

/* ===========================
   PRODUCT CARD VARIATIONS (Shop/Home)
   =========================== */

.product-variations-quick {
    margin: 10px 0;
    padding: 5px 0;
}

.product-variations-quick .variation-label {
    font-size: 11px;
    font-weight: 600;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.product-variations-quick .variation-options {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.variation-option {
    display: inline-block;
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: #fff;
    color: #333;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 35px;
    text-align: center;
    user-select: none;
    line-height: 1;
}

.variation-option:hover {
    border-color: #252a28;
    background: #f8f8f8;
}

.variation-option.active {
    border-color: #252a28;
    background: #252a28;
    color: #fff;
    font-weight: 700;
}

.variation-option.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

/* Adjust product card with variations */
.product-type-variable .product-info {
    padding-bottom: 5px;
}

.product-type-variable .add_to_cart_button {
    font-size: 12px;
    padding: 10px 15px;
}
