/**
 * Ziva Boutique Theme WooCommerce Overrides CSS
 * Styling grids, single product galleries, swatch circular cards, size selectors, cart details, checkouts, dashboard
 */

/* 4-Column Grid layout for catalog products */
ul.products {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 30px !important;
    list-style: none !important;
    padding: 0 !important;
    margin: 30px 0 !important;
}

ul.products:before, ul.products:after {
    display: none !important;
}

/* Catalog Product Card */
li.product {
    background-color: #ffffff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    position: relative;
    display: flex !important;
    flex-direction: column;
    width: 100% !important;
    margin: 0 !important;
    float: none !important;
    border: 1px solid #f2f2f2;
}

li.product:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.product-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3 / 4;
    background-color: #f7f7f7;
}

.product-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.product-image-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

li.product:hover .product-image-link img {
    transform: scale(1.06);
}

/* Secondary Hover Image swap */
.hover-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.6s ease;
    z-index: 2;
}

li.product:hover .hover-image {
    opacity: 1;
}

/* Labels and Badges */
.product-badges {
    position: absolute;
    top: 15px;
    left: 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 3;
}

.badge-item {
    font-family: 'Outfit', sans-serif;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 3px;
    color: #ffffff;
    text-align: center;
}

.badge-item.sale {
    background-color: #c62828; /* Premium dark red */
}

.badge-item.new {
    background-color: var(--primary-color); /* Premium boutique gold */
}

.badge-item.best-seller {
    background-color: #111111;
}

.badge-item.trending {
    background-color: #2e7d32;
}

.product-discount-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ffffff;
    color: #c62828;
    font-family: 'Outfit', sans-serif;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    z-index: 3;
}

/* Loop Add To Cart triggers overlay */
.product-actions-overlay {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(to top, rgba(255,255,255,1) 70%, rgba(255,255,255,0));
    transition: var(--transition);
    z-index: 4;
    display: flex;
    justify-content: center;
}

li.product:hover .product-actions-overlay {
    bottom: 0;
}

/* Loop product description content */
.product-card-details {
    padding: 18px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: #ffffff;
}

.product-category-meta {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.product-title-link {
    font-family: 'Outfit', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    color: #1f1f1f;
    margin: 0 0 8px;
    line-height: 1.4;
    display: block;
    height: 40px;
    overflow: hidden;
}

.product-title-link:hover {
    color: var(--primary-color);
}

.product-rating-stars {
    font-size: 11px;
    color: #ffb100;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 3px;
}

.product-rating-stars span.rating-count {
    color: var(--text-muted);
    font-size: 11px;
    margin-left: 4px;
}

.product-price-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 600;
}

.product-price-row del {
    color: #bbb;
    font-size: 13px;
    font-weight: 400;
}

.product-price-row ins {
    text-decoration: none;
    color: #1f1f1f;
}

/* Single Product styling layout grid */
.ziva-single-product-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    margin: 40px auto;
}

/* Gallery slider custom styling */
.ziva-gallery-wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ziva-main-image-viewport {
    background-color: #fafafa;
    border-radius: var(--border-radius);
    overflow: hidden;
    aspect-ratio: 3 / 4;
}

.ziva-main-image-viewport img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ziva-gallery-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 5px;
}

.ziva-thumb-item {
    width: 80px;
    height: 105px;
    border-radius: 4px;
    overflow: hidden;
    background-color: #f7f7f7;
    cursor: pointer;
    border: 2px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.ziva-thumb-item.active, .ziva-thumb-item:hover {
    border-color: var(--primary-color);
}

.ziva-thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Detailed Single Product actions side info */
.ziva-product-meta-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: var(--primary-color);
    background-color: var(--primary-light);
    padding: 4px 10px;
    border-radius: 20px;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ziva-single-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 500;
    line-height: 1.25;
    margin: 0 0 10px;
    color: #111111;
}

.ziva-single-rating-section {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13.5px;
    color: #ffb100;
    margin-bottom: 20px;
}

.ziva-single-rating-section span.review-link-label {
    color: var(--text-muted);
}

.ziva-single-price-box {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.ziva-single-price-box .price-amount {
    font-size: 24px;
    font-weight: 600;
    color: #1f1f1f;
}

.ziva-single-price-box del {
    color: #bbb;
    font-size: 18px;
}

.ziva-single-price-box .discount-tag-pill {
    background-color: #ffebee;
    color: #c62828;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ziva-single-short-desc {
    font-size: 14.5px;
    line-height: 1.7;
    color: #555;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 25px;
}

/* Custom Swatches Variation */
.ziva-variation-section {
    margin-bottom: 25px;
}

.variation-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.variation-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111111;
}

.selected-attribute-value {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.size-chart-trigger-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-family: 'Outfit', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: underline;
}

/* Color Swatches Grid */
.color-swatches-grid {
    display: flex;
    gap: 12px;
}

.color-swatch-item {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 0 1px #ddd;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.color-swatch-item.active {
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* Size Swatches Button Grid */
.size-swatches-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.size-swatch-item {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #1f1f1f;
    cursor: pointer;
    transition: var(--transition);
    background-color: #ffffff;
    min-width: 48px;
    text-align: center;
}

.size-swatch-item:hover {
    border-color: #1f1f1f;
}

.size-swatch-item.active {
    background-color: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* Standard WC variation selects are hidden */
.variations select {
    display: none !important;
}

/* Quantity + Add to Cart buttons */
.ziva-cart-quantity-row {
    display: flex;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.ziva-qty-selector {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    height: 48px;
}

.ziva-qty-selector button {
    background: none;
    border: none;
    width: 40px;
    height: 100%;
    cursor: pointer;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.ziva-qty-selector button:hover {
    background-color: var(--bg-light);
}

.ziva-qty-selector input {
    border: none;
    width: 45px;
    height: 100%;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    outline: none;
}

.ziva-add-to-cart-btn {
    flex-grow: 1;
    height: 48px;
    border: none;
    background-color: #111111;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ziva-add-to-cart-btn:hover {
    background-color: var(--primary-color);
}

.ziva-buy-now-btn {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border-color);
    background-color: #ffffff;
    color: #111111;
    font-family: 'Outfit', sans-serif;
    font-size: 13.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.ziva-buy-now-btn:hover {
    background-color: #111111;
    color: #ffffff;
    border-color: #111111;
}

/* Accordion Tab Lists for product information */
.ziva-product-tabs-accordion {
    border-top: 1px solid var(--border-color);
    margin-top: 40px;
}

.ziva-accordion-tab-item {
    border-bottom: 1px solid var(--border-color);
}

.ziva-accordion-tab-trigger {
    width: 100%;
    padding: 16px 0;
    background: none;
    border: none;
    outline: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Outfit', sans-serif;
    font-size: 14.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #111111;
}

.ziva-accordion-tab-trigger i {
    font-size: 11px;
    transition: transform 0.3s ease;
}

.ziva-accordion-tab-item.active .ziva-accordion-tab-trigger i {
    transform: rotate(180deg);
}

.ziva-accordion-tab-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
}

.ziva-accordion-tab-content-inner {
    padding: 5px 0 20px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--text-muted);
}

/* Cart Page design styling table override */
.shop_table.cart {
    width: 100%;
    border-collapse: collapse;
}

.shop_table.cart th {
    background-color: var(--primary-light);
    color: #1f1f1f;
    padding: 14px 18px;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.shop_table.cart td {
    padding: 18px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.cart_item .product-thumbnail img {
    width: 60px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

/* Cart totals block card */
.cart-collaterals {
    margin-top: 40px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.cart_totals {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

.cart_totals h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

/* Checkout columns split design override */
.woocommerce-checkout {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    margin-top: 40px;
}

#customer_details h3, #order_review_heading {
    font-family: 'Outfit', sans-serif;
    font-size: 18px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #111;
}

#order_review {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 30px;
    box-shadow: var(--shadow-sm);
}

/* My Account Navigation buttons links */
.woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid var(--border-color);
}

.woocommerce-MyAccount-navigation ul li:last-child {
    border-bottom: none;
}

.woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 14px 20px;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    color: #1f1f1f;
    transition: var(--transition);
}

.woocommerce-MyAccount-navigation ul li.is-active a, 
.woocommerce-MyAccount-navigation ul li a:hover {
    background-color: var(--primary-light);
    color: var(--primary-color);
    padding-left: 25px;
}

.woocommerce-MyAccount-content {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 35px;
    box-shadow: var(--shadow-sm);
}

/* Responsive grid changes */
@media (max-width: 1024px) {
    ul.products {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }
    
    .ziva-single-product-container {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .cart-collaterals, .woocommerce-checkout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    ul.products {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }
    
    li.product:hover .product-actions-overlay {
        display: none !important;
    }
    
    .badge-item {
        font-size: 8.5px;
        padding: 3px 6px;
    }
}
