/**
 * WooCommerce Styles
 * 
 * Single Product, Cart, Checkout, My Account
 * Premium styling with dark mode support
 * 
 * @package Commerce_Elite
 */
 
 

/* ============================================
   SINGLE PRODUCT PAGE
   ============================================ */

/* Product images gallery */
body:not(.single-product) .woocommerce-product-gallery {
    position: relative;
}

body:not(.single-product) .woocommerce-product-gallery__wrapper {
    margin: 0;
    padding: 0;
}

body:not(.single-product) .woocommerce-product-gallery__image {
    margin-bottom: 1rem;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--color-surface);
}

body:not(.single-product) .woocommerce-product-gallery__image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-slow);
}

body:not(.single-product) .woocommerce-product-gallery__image:hover img {
    transform: scale(1.05);
}

/* Gallery thumbnails */
.woocommerce-product-gallery__thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.woocommerce-product-gallery__thumbnails img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.woocommerce-product-gallery__thumbnails img:hover,
.woocommerce-product-gallery__thumbnails img.active {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

/* Product summary */
.summary {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Product title */
.product_title {
    font-size: var(--font-size-2xl);
    margin: 0;
    line-height: var(--line-height-tight);
}

/* Product price */
.price {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--color-text);
}

.price del {
    font-size: var(--font-size-lg);
    color: var(--color-text-muted);
    text-decoration: line-through;
}

.price ins {
    text-decoration: none;
    color: var(--color-accent);
}

/* Product rating */
.woocommerce-product-rating {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.star-rating {
    position: relative;
    display: inline-block;
    width: 5.5em;
    height: 1.2em;
    font-size: 1rem;
    color: #ddd;
}

.star-rating::before {
    content: "★★★★★";
    letter-spacing: 0.1em;
}

.star-rating span {
    position: absolute;
    top: 0;
    left: 0;
    overflow: hidden;
    color: #ffa500;
}

.star-rating span::before {
    content: "★★★★★";
    letter-spacing: 0.1em;
}

.woocommerce-review-link {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Product brand (from our custom taxonomy) */
.product-brand-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.product-brand-logo img {
    max-height: 40px;
    width: auto;
}

.product-brand-name {
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

/* Short description */
.woocommerce-product-details__short-description {
    font-size: var(--font-size-md);
    line-height: var(--line-height-relaxed);
    color: var(--color-text-light);
}

/* Add to cart form */
.cart {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}

.quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.quantity input[type="number"] {
    width: 60px;
    border: none;
    text-align: center;
    padding: 0.75rem 0.5rem;
    -moz-appearance: textfield;
}

.quantity input[type="number"]::-webkit-inner-spin-button,
.quantity input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.quantity button {
    padding: 0.75rem 1rem;
    background: var(--color-surface);
    border: none;
    cursor: pointer;
    transition: background var(--transition-fast);
}

.quantity button:hover {
    background: var(--color-surface-dark);
}

/* Product meta (SKU, categories, tags) */
.product_meta {
    padding-top: 1.5rem;
    border-top: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
}

.product_meta > span {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text-light);
}

.product_meta a {
    color: var(--color-primary);
}

/* ============================================
   PRODUCT TABS
   ============================================ */

.woocommerce-tabs {
    margin-top: 3rem;
}

.wc-tabs {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0 0 2rem;
    padding: 0;
    border-bottom: 2px solid var(--color-border);
}

.wc-tabs li {
    margin: 0;
}

.wc-tabs li a {
    display: block;
    padding: 1rem 1.5rem;
    font-weight: var(--font-weight-medium);
    color: var(--color-text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all var(--transition-fast);
}

.wc-tabs li a:hover {
    color: var(--color-primary);
}

.wc-tabs li.active a {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.wc-tab {
    display: none;
}

.wc-tab.active {
    display: block;
    animation: tab-fade-in 0.3s ease;
}

@keyframes tab-fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   PRODUCT REVIEWS
   ============================================ */

#reviews {
    padding: 2rem;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
}

.woocommerce-Reviews-title {
    margin-top: 0;
}

.commentlist {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.commentlist .comment {
    padding: 1.5rem;
    background: var(--color-background);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.comment_container {
    display: flex;
    gap: 1rem;
}

.avatar {
    border-radius: 50%;
    flex-shrink: 0;
}

.comment-text {
    flex: 1;
}

.meta {
    margin-bottom: 0.5rem;
}

.woocommerce-review__author {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.woocommerce-review__dash {
    margin: 0 0.5rem;
    color: var(--color-text-muted);
}

.woocommerce-review__published-date {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

.description p {
    margin: 0.5rem 0;
}

/* Review form */
.comment-reply-title {
    margin-top: 2rem;
}



/* ============================================
    color: var(--color-text-muted);
}

/* ============================================
   CHECKOUT PAGE
   ============================================ */

.woocommerce-checkout {
    display: grid;
    gap: 2rem;
}

/* Checkout coupon */
.woocommerce-form-coupon-toggle {
    margin-bottom: 2rem;
}

.woocommerce-form-coupon {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

/* Order review table */
#order_review_heading {
    margin-top: 0;
}

#order_review {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

/* Place order button */
#place_order {
    width: 100%;
    font-size: var(--font-size-lg);
    padding: 1.25rem;
    margin-top: 1.5rem;
}

/* ============================================
   MY ACCOUNT PAGE
   ============================================ */

/* Target the actual parent element that contains navigation + content */
body.woocommerce-account .woocommerce {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 3rem;
    width: 100%;
}

/* Force navigation to stay in first column */
body.woocommerce-account .woocommerce-MyAccount-navigation {
    grid-column: 1;
    width: 100%;
    max-width: 250px;
}

/* Force content to stay in second column */
body.woocommerce-account .woocommerce-MyAccount-content {
    grid-column: 2;
    width: 100%;
    max-width: none;
}

/* Account navigation */
.woocommerce-MyAccount-navigation {
    background: var(--color-surface);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    height: fit-content;
    position: sticky;
    top: calc(var(--header-height, 80px) + 2rem);
}

.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-MyAccount-navigation li {
    margin-bottom: 0.5rem;
}

.woocommerce-MyAccount-navigation a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--color-text);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.woocommerce-MyAccount-navigation a:hover {
    background: var(--color-background);
    color: var(--color-primary);
}

.woocommerce-MyAccount-navigation .is-active a {
    background: var(--color-primary);
    color: #ffffff;
    font-weight: var(--font-weight-medium);
}

/* Account content */
.woocommerce-MyAccount-content {
    /* Remove background/padding - let inner elements handle their own styling */
    width: 100%;
    max-width: 100%;
}

/* Orders table */
.woocommerce-orders-table {
    width: 100%;
    background: var(--color-background);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.woocommerce-orders-table thead {
    background: var(--color-surface);
}

.woocommerce-orders-table th,
.woocommerce-orders-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border-light);
}

.woocommerce-orders-table .button {
    padding: 0.5rem 1rem;
    font-size: var(--font-size-sm);
}

/* Order tracking (from our custom system) */
.order-tracking-info {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}

.tracking-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tracking-number code {
    background: var(--color-background);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-md);
    font-size: var(--font-size-lg);
    display: inline-block;
}

/* Order status timeline */
.order-status-timeline {
    margin-top: 2rem;
}

.timeline {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    justify-content: space-between;
    position: relative;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 1.25rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    z-index: 1;
}

.timeline-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: var(--color-background);
    border: 2px solid var(--color-border);
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.timeline-item.completed .timeline-icon {
    background: var(--color-success);
    border-color: var(--color-success);
    color: #ffffff;
}

.timeline-item.current .timeline-icon {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(34, 113, 177, 0.4);
    }
    50% {
        box-shadow: 0 0 0 10px rgba(34, 113, 177, 0);
    }
}

.timeline-label {
    font-size: var(--font-size-xs);
    font-weight: var(--font-weight-medium);
    text-align: center;
    color: var(--color-text-muted);
}

.timeline-item.completed .timeline-label,
.timeline-item.current .timeline-label {
    color: var(--color-text);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1023px) {
    body.woocommerce-account .woocommerce {
        grid-template-columns: 1fr;
    }
    
    .woocommerce-MyAccount-navigation {
        position: static;
    }
    
    .woocommerce-MyAccount-navigation ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .woocommerce-MyAccount-navigation li {
        margin: 0;
    }
}

@media (max-width: 768px) {
    .product-main-content {
        grid-template-columns: 1fr;
    }
    
    
    
    .timeline {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline::before {
        top: 0;
        bottom: 0;
        left: 1.25rem;
        width: 2px;
        height: auto;
    }
    
    .timeline-item {
        flex-direction: row;
        width: 100%;
    }
}