/* ============================================
   CaliOptik - Product Detail Styles
   ============================================ */

/* --- Product Detail Layout --- */
.co-product-detail {
    padding: var(--co-space-10) 0 var(--co-space-20);
}

.co-product-detail__inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--co-space-12);
    align-items: start;
}

/* --- Product Gallery --- */
.co-product-gallery {
    position: sticky;
    top: 100px;
}

.co-product-gallery__main {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background-color: var(--co-gray-50);
    border-radius: var(--co-radius-md);
    margin-bottom: var(--co-space-4);
    cursor: zoom-in;
}

.co-product-gallery__main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.co-product-gallery__main.co-zoomed img {
    cursor: zoom-out;
}

.co-product-gallery__zoom-lens {
    position: absolute;
    width: 200px;
    height: 200px;
    border: 2px solid var(--co-accent);
    background-color: rgba(181, 154, 122, 0.1);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--co-transition-fast);
    z-index: 3;
}

.co-product-gallery__main:hover .co-product-gallery__zoom-lens {
    opacity: 1;
}

/* Thumbnails */
.co-product-gallery__thumbs {
    display: flex;
    gap: var(--co-space-3);
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding-bottom: var(--co-space-2);
}

.co-product-gallery__thumbs::-webkit-scrollbar {
    display: none;
}

.co-product-gallery__thumb {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: var(--co-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color var(--co-transition-fast);
    background-color: var(--co-gray-50);
}

.co-product-gallery__thumb.co-active,
.co-product-gallery__thumb:hover {
    border-color: var(--co-accent);
}

.co-product-gallery__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Badge on detail page */
.co-product-detail .co-badge {
    position: absolute;
    top: var(--co-space-4);
    left: var(--co-space-4);
    z-index: 2;
}

/* --- Product Info --- */
.co-product-info {
    padding-top: var(--co-space-2);
}

.co-product-info__brand {
    display: inline-flex;
    align-items: center;
    gap: var(--co-space-2);
    font-size: var(--co-text-sm);
    font-weight: var(--co-font-medium);
    color: var(--co-accent);
    letter-spacing: var(--co-tracking-wide);
    text-transform: uppercase;
    margin-bottom: var(--co-space-3);
    text-decoration: none;
}

.co-product-info__brand:hover {
    color: var(--co-accent-hover);
}

.co-product-info__title {
    font-family: var(--co-font-heading);
    font-size: var(--co-text-3xl);
    font-weight: var(--co-font-bold);
    color: var(--co-primary);
    line-height: var(--co-leading-tight);
    margin-bottom: var(--co-space-4);
}

.co-product-info__sku {
    font-size: var(--co-text-xs);
    color: var(--co-gray-400);
    margin-bottom: var(--co-space-6);
}

/* Price */
.co-product-info__price {
    margin-bottom: var(--co-space-6);
    padding-bottom: var(--co-space-6);
    border-bottom: 1px solid var(--co-border-light);
}

.co-product-info__price .price {
    font-size: var(--co-text-2xl);
    font-weight: var(--co-font-bold);
    display: flex;
    align-items: baseline;
    gap: var(--co-space-3);
}

.co-product-info__price .price del {
    font-size: var(--co-text-lg);
    color: var(--co-gray-400);
}

.co-product-info__price .price ins {
    color: var(--co-danger);
    text-decoration: none;
}

.co-product-info__savings {
    display: inline-flex;
    align-items: center;
    gap: var(--co-space-1);
    margin-top: var(--co-space-2);
    padding: var(--co-space-1) var(--co-space-3);
    background-color: rgba(220, 38, 38, 0.08);
    color: var(--co-danger);
    font-size: var(--co-text-xs);
    font-weight: var(--co-font-semibold);
    border-radius: var(--co-radius-sm);
}

/* Short description */
.co-product-info__short-desc {
    font-size: var(--co-text-base);
    color: var(--co-gray-600);
    line-height: var(--co-leading-relaxed);
    margin-bottom: var(--co-space-6);
}

.co-product-info__short-desc p {
    margin: 0 0 var(--co-space-3);
}

/* Stock */
.co-product-info__stock {
    margin-bottom: var(--co-space-6);
}

/* Add to Cart */
.co-product-info__add-to-cart {
    margin-bottom: var(--co-space-6);
    padding-bottom: var(--co-space-6);
    border-bottom: 1px solid var(--co-border-light);
}

.co-product-info__add-to-cart form.cart {
    display: flex;
    align-items: stretch;
    gap: var(--co-space-3);
}

.co-product-info__add-to-cart .quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--co-border);
    border-radius: var(--co-radius-sm);
    overflow: hidden;
}

.co-product-info__add-to-cart .quantity .qty {
    width: 60px;
    height: 50px;
    text-align: center;
    font-size: var(--co-text-base);
    font-weight: var(--co-font-medium);
    border: none;
    padding: 0;
    -moz-appearance: textfield;
}

.co-product-info__add-to-cart .quantity .qty::-webkit-outer-spin-button,
.co-product-info__add-to-cart .quantity .qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
}

.co-qty-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 50px;
    background: var(--co-gray-50);
    border: none;
    cursor: pointer;
    font-size: var(--co-text-lg);
    color: var(--co-gray-600);
    transition: all var(--co-transition-fast);
}

.co-qty-btn:hover {
    background: var(--co-gray-100);
    color: var(--co-primary);
}

.co-product-info__add-to-cart .single_add_to_cart_button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--co-space-2);
    padding: var(--co-space-4) var(--co-space-8);
    background-color: var(--co-primary);
    color: var(--co-bg);
    border: none;
    font-size: var(--co-text-sm);
    font-weight: var(--co-font-semibold);
    letter-spacing: var(--co-tracking-wider);
    text-transform: uppercase;
    cursor: pointer;
    transition: all var(--co-transition-fast);
    border-radius: var(--co-radius-sm);
}

.co-product-info__add-to-cart .single_add_to_cart_button:hover {
    background-color: var(--co-accent);
}

/* Product meta */
.co-product-meta {
    margin-bottom: var(--co-space-6);
}

.co-product-meta__item {
    display: flex;
    align-items: center;
    gap: var(--co-space-3);
    padding: var(--co-space-3) 0;
    font-size: var(--co-text-sm);
    border-bottom: 1px solid var(--co-border-light);
}

.co-product-meta__label {
    color: var(--co-gray-500);
    min-width: 100px;
}

.co-product-meta__value {
    color: var(--co-primary);
    font-weight: var(--co-font-medium);
}

.co-product-meta__value a {
    color: var(--co-accent);
    text-decoration: none;
}

.co-product-meta__value a:hover {
    text-decoration: underline;
}

/* Trust badges */
.co-trust-badges {
    display: flex;
    gap: var(--co-space-6);
    padding: var(--co-space-6);
    background-color: var(--co-gray-50);
    border-radius: var(--co-radius-md);
    margin-top: var(--co-space-6);
}

.co-trust-badge {
    display: flex;
    align-items: center;
    gap: var(--co-space-3);
    font-size: var(--co-text-xs);
    color: var(--co-gray-600);
}

.co-trust-badge svg {
    color: var(--co-accent);
    flex-shrink: 0;
}

/* --- Product Tabs --- */
.co-product-tabs {
    margin-top: var(--co-space-16);
    border-top: 1px solid var(--co-border-light);
}

.woocommerce-tabs .tabs,
.co-product-tabs__nav {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid var(--co-border-light);
}

.woocommerce-tabs .tabs li,
.co-product-tabs__nav-item {
    margin: 0;
}

.woocommerce-tabs .tabs li a,
.co-product-tabs__nav-link {
    display: block;
    padding: var(--co-space-4) var(--co-space-6);
    font-size: var(--co-text-sm);
    font-weight: var(--co-font-medium);
    color: var(--co-gray-500);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all var(--co-transition-fast);
    letter-spacing: var(--co-tracking-wide);
    text-transform: uppercase;
    white-space: nowrap;
}

.woocommerce-tabs .tabs li a:hover,
.co-product-tabs__nav-link:hover {
    color: var(--co-primary);
}

.woocommerce-tabs .tabs li.active a,
.co-product-tabs__nav-link.co-active {
    color: var(--co-primary);
    border-bottom-color: var(--co-accent);
}

.woocommerce-Tabs-panel,
.co-product-tabs__panel {
    padding: var(--co-space-8) 0;
    font-size: var(--co-text-base);
    line-height: var(--co-leading-relaxed);
    color: var(--co-gray-600);
}

.woocommerce-Tabs-panel h2 {
    display: none;
}

/* Product attributes table */
.woocommerce-product-attributes {
    width: 100%;
    border-collapse: collapse;
}

.woocommerce-product-attributes th,
.woocommerce-product-attributes td {
    padding: var(--co-space-3) var(--co-space-4);
    font-size: var(--co-text-sm);
    border-bottom: 1px solid var(--co-border-light);
    text-align: left;
}

.woocommerce-product-attributes th {
    color: var(--co-gray-500);
    font-weight: var(--co-font-medium);
    width: 40%;
    background-color: var(--co-gray-50);
}

.woocommerce-product-attributes td {
    color: var(--co-primary);
}

/* --- Related Products --- */
.co-related-products {
    padding: var(--co-space-16) 0;
    border-top: 1px solid var(--co-border-light);
    margin-top: var(--co-space-10);
}

.co-related-products__title,
.related.products > h2 {
    font-family: var(--co-font-heading);
    font-size: var(--co-text-2xl);
    font-weight: var(--co-font-bold);
    color: var(--co-primary);
    margin-bottom: var(--co-space-8);
    text-align: center;
}

.related.products .products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--co-space-6);
}
