/**
 * Petit Chouïa WooCommerce Styles
 *
 * @package PetitChouia
 * @since 1.0.0
 */

/* ==========================================================================
   WooCommerce Reset
   ========================================================================== */

.woocommerce ul.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--yt-space-6);
    margin: 0;
    padding: 0;
}

.woocommerce ul.products li.product {
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
}

/* ==========================================================================
   Single Product
   ========================================================================== */

.yt-product {
    padding: var(--yt-space-8) 0 var(--yt-space-16);
}

.yt-product__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--yt-space-10);
    align-items: start;
    margin-bottom: var(--yt-space-12);
}

/* Product Gallery */
.yt-product__gallery {
    position: sticky;
    top: 100px;
}

.yt-product__main-image {
    border-radius: var(--yt-radius-2xl);
    overflow: hidden;
    background-color: var(--yt-color-cream-dark);
    aspect-ratio: 1;
    max-width: 480px;
}

.yt-product__main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.yt-product__placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--yt-color-text-muted);
    gap: var(--yt-space-3);
    background-color: var(--yt-color-cream-dark);
}

.yt-product__placeholder span {
    font-size: var(--yt-font-size-sm);
}

.yt-product__thumbnails {
    display: flex;
    gap: var(--yt-space-3);
    margin-top: var(--yt-space-4);
}

.yt-product__thumb {
    width: 70px;
    height: 70px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: var(--yt-radius-lg);
    overflow: hidden;
    cursor: pointer;
    background: var(--yt-color-cream-dark);
    transition: border-color var(--yt-transition-fast);
}

.yt-product__thumb:hover,
.yt-product__thumb--active {
    border-color: var(--yt-color-gold);
}

.yt-product__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Product Info */
.yt-product__info {
    padding: var(--yt-space-4) 0;
}

.yt-product__title {
    font-family: var(--yt-font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 var(--yt-space-2);
    color: var(--yt-color-text);
    line-height: 1.1;
}

.yt-product__price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--yt-color-text);
    margin: 0 0 var(--yt-space-4);
}

.yt-product__price del {
    color: var(--yt-color-text-muted);
    margin-right: var(--yt-space-2);
    font-weight: 400;
}

.yt-product__price ins {
    text-decoration: none;
    color: var(--yt-color-gold);
}

.yt-product__short-desc {
    font-size: var(--yt-font-size-base);
    color: var(--yt-color-text-light);
    margin-bottom: var(--yt-space-6);
    line-height: 1.6;
}

/* Product Form */
.yt-product__form {
    margin-bottom: var(--yt-space-6);
}

/* Size Selector */
.yt-product__sizes {
    margin-bottom: var(--yt-space-6);
}

.yt-product__sizes-label {
    display: block;
    font-size: var(--yt-font-size-sm);
    font-weight: 500;
    color: var(--yt-color-text);
    margin-bottom: var(--yt-space-3);
}

.yt-product__sizes-buttons {
    display: flex;
    gap: var(--yt-space-2);
    flex-wrap: wrap;
}

.yt-size-btn {
    min-width: 48px;
    height: 40px;
    padding: 0 var(--yt-space-4);
    font-family: var(--yt-font-primary);
    font-size: var(--yt-font-size-sm);
    font-weight: 500;
    color: var(--yt-color-text);
    background-color: var(--yt-color-white);
    border: 1.5px solid var(--yt-color-cream-dark);
    border-radius: var(--yt-radius-full);
    cursor: pointer;
    transition: all var(--yt-transition-fast);
}

.yt-size-btn:hover {
    border-color: var(--yt-color-text-light);
}

.yt-size-btn--active,
.yt-size-btn--selected {
    background-color: var(--yt-color-text);
    color: var(--yt-color-white);
    border-color: var(--yt-color-text);
}

/* Add to Cart Button */
.yt-btn--add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--yt-space-2);
    width: 100%;
    padding: var(--yt-space-4) var(--yt-space-8);
    font-family: var(--yt-font-primary);
    font-size: var(--yt-font-size-base);
    font-weight: 600;
    color: var(--yt-color-text);
    background-color: var(--yt-color-gold);
    border: none;
    border-radius: var(--yt-radius-full);
    cursor: pointer;
    transition: all var(--yt-transition-fast);
}

.yt-btn--add-to-cart:hover {
    background-color: var(--yt-color-gold-hover);
    transform: translateY(-2px);
}

.yt-btn--add-to-cart svg {
    flex-shrink: 0;
}

/* Shipping Info */
.yt-product__shipping {
    display: inline-flex;
    align-items: center;
    gap: var(--yt-space-2);
    padding: var(--yt-space-2) var(--yt-space-4);
    font-size: var(--yt-font-size-sm);
    color: var(--yt-color-text-light);
    background-color: var(--yt-color-cream-dark);
    border-radius: var(--yt-radius-full);
    margin-top: var(--yt-space-4);
}

.yt-product__shipping svg {
    flex-shrink: 0;
    opacity: 0.7;
}

/* Product Details Section */
.yt-product__details-section {
    padding: var(--yt-space-8) 0;
    border-top: 1px solid var(--yt-color-cream-dark);
}

.yt-product__details-title {
    font-size: var(--yt-font-size-xl);
    font-weight: 600;
    margin-bottom: var(--yt-space-4);
}

.yt-product__details-content {
    margin-bottom: var(--yt-space-6);
}

.yt-product__description {
    font-size: var(--yt-font-size-base);
    color: var(--yt-color-text-light);
    line-height: 1.7;
}

.yt-product__description p {
    margin-bottom: var(--yt-space-4);
}

/* Expression Tags */
.yt-product__expressions {
    margin-top: var(--yt-space-6);
}

.yt-expression-tags {
    display: flex;
    gap: var(--yt-space-3);
    flex-wrap: wrap;
}

.yt-expression-tag {
    display: inline-flex;
    align-items: center;
    padding: var(--yt-space-2) var(--yt-space-4);
    font-size: var(--yt-font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: var(--yt-radius-full);
    transition: transform var(--yt-transition-fast);
}

.yt-expression-tag:hover {
    transform: scale(1.05);
}

.yt-expression-tag--gold {
    background-color: var(--yt-color-gold-light);
    color: var(--yt-color-gold-hover);
}

.yt-expression-tag--terracotta {
    background-color: var(--yt-color-terracotta-light);
    color: var(--yt-color-terracotta-dark);
}

.yt-expression-tag--red {
    background-color: var(--yt-color-red-light);
    color: var(--yt-color-red);
}

.yt-expression-tag--current {
    box-shadow: 0 0 0 2px var(--yt-color-text);
}

/* Related Products */
.yt-product__related {
    padding-top: var(--yt-space-10);
    border-top: 1px solid var(--yt-color-cream-dark);
}

.yt-product__related .yt-section__title {
    font-size: var(--yt-font-size-xl);
    margin-bottom: var(--yt-space-8);
}

/* ==========================================================================
   Cart Page
   ========================================================================== */

.yt-cart {
    padding: var(--yt-space-10) 0;
}

.yt-cart__header {
    text-align: center;
    margin-bottom: var(--yt-space-10);
}

.yt-cart__title {
    font-size: var(--yt-font-size-4xl);
    margin-bottom: var(--yt-space-2);
}

.yt-cart__subtitle {
    font-size: var(--yt-font-size-base);
    color: var(--yt-color-text-light);
    margin-bottom: var(--yt-space-6);
}

.yt-cart__grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--yt-space-10);
    align-items: start;
}

.yt-cart__section-title {
    font-size: var(--yt-font-size-lg);
    margin-bottom: var(--yt-space-6);
}

/* Cart Items */
.yt-cart__products {
    display: flex;
    flex-direction: column;
    gap: var(--yt-space-4);
    margin-bottom: var(--yt-space-6);
}

.yt-cart__item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    gap: var(--yt-space-4);
    align-items: center;
    padding: var(--yt-space-4);
    background-color: var(--yt-color-white);
    border-radius: var(--yt-radius-lg);
}

.yt-cart__item-image {
    width: 80px;
    height: 80px;
    border-radius: var(--yt-radius-md);
    overflow: hidden;
    background-color: var(--yt-color-cream);
}

.yt-cart__item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yt-cart__item-name {
    font-size: var(--yt-font-size-sm);
    font-weight: var(--yt-font-weight-medium);
    margin: 0;
}

.yt-cart__item-name a {
    color: inherit;
    text-decoration: none;
}

.yt-cart__item-price {
    font-size: var(--yt-font-size-sm);
    color: var(--yt-color-text-light);
}

.yt-cart__item-quantity .qty {
    width: 50px;
    padding: var(--yt-space-2);
    text-align: center;
    border: 1px solid var(--yt-color-cream-dark);
    border-radius: var(--yt-radius-md);
}

.yt-cart__item-subtotal {
    font-weight: var(--yt-font-weight-semibold);
}

.yt-cart__remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: var(--yt-font-size-lg);
    color: var(--yt-color-text-muted);
    text-decoration: none;
    transition: color var(--yt-transition-fast);
}

.yt-cart__remove:hover {
    color: var(--yt-color-text);
}

/* Cart Actions */
.yt-cart__actions {
    display: flex;
    gap: var(--yt-space-4);
    margin-bottom: var(--yt-space-8);
}

/* Cart Summary */
.yt-cart__summary-card {
    background-color: var(--yt-color-cream-light);
    border-radius: var(--yt-radius-xl);
    padding: var(--yt-space-6);
}

.yt-cart__summary-title {
    font-size: var(--yt-font-size-xl);
    margin-bottom: var(--yt-space-2);
}

.yt-cart__summary-text {
    font-size: var(--yt-font-size-sm);
    color: var(--yt-color-text-light);
    margin-bottom: var(--yt-space-6);
}

.yt-cart__summary-illustration {
    display: flex;
    justify-content: center;
    margin-bottom: var(--yt-space-6);
}

.yt-cart__order-details h3 {
    font-size: var(--yt-font-size-base);
    margin-bottom: var(--yt-space-4);
}

.yt-cart__size-selector {
    margin-bottom: var(--yt-space-4);
}

.yt-cart__size-label {
    display: block;
    font-size: var(--yt-font-size-sm);
    margin-bottom: var(--yt-space-2);
}

/* Totals */
.yt-cart__totals {
    margin-top: var(--yt-space-6);
    padding-top: var(--yt-space-6);
    border-top: 1px solid var(--yt-color-cream-dark);
}

.yt-cart__totals-row {
    display: flex;
    justify-content: space-between;
    padding: var(--yt-space-2) 0;
    font-size: var(--yt-font-size-sm);
}

.yt-cart__totals-row--total {
    font-size: var(--yt-font-size-base);
    font-weight: var(--yt-font-weight-bold);
    padding-top: var(--yt-space-4);
    margin-top: var(--yt-space-2);
    border-top: 1px solid var(--yt-color-cream-dark);
}

.yt-cart__checkout-btn {
    margin-top: var(--yt-space-6);
}

.yt-cart__checkout-btn .checkout-button,
.yt-cart__checkout-btn .yt-btn--full {
    display: block;
    width: 100%;
    padding: var(--yt-space-4);
    font-family: var(--yt-font-primary);
    font-size: var(--yt-font-size-base);
    font-weight: var(--yt-font-weight-semibold);
    text-align: center;
    color: var(--yt-color-text);
    background-color: var(--yt-color-gold);
    border: none;
    border-radius: var(--yt-radius-full);
    cursor: pointer;
    transition: all var(--yt-transition-fast);
    text-decoration: none;
}

.yt-cart__checkout-btn .checkout-button:hover,
.yt-cart__checkout-btn .yt-btn--full:hover {
    background-color: var(--yt-color-gold-hover);
}

.yt-cart__continue {
    margin-top: var(--yt-space-4);
    text-align: center;
}

.yt-cart__continue-link {
    font-size: var(--yt-font-size-sm);
    color: var(--yt-color-text-muted);
    text-decoration: underline;
    transition: color var(--yt-transition-fast);
}

.yt-cart__continue-link:hover {
    color: var(--yt-color-text);
}

/* ==========================================================================
   Checkout Page
   ========================================================================== */

.yt-checkout {
    padding: var(--yt-space-10) 0;
}

.yt-checkout__header {
    text-align: center;
    margin-bottom: var(--yt-space-10);
}

.yt-checkout__title {
    font-size: var(--yt-font-size-4xl);
}

.yt-checkout__grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: var(--yt-space-10);
    align-items: start;
}

.yt-checkout__section {
    margin-bottom: var(--yt-space-8);
}

.yt-checkout__section-title {
    font-size: var(--yt-font-size-lg);
    margin-bottom: var(--yt-space-6);
}

/* Checkout form fields */
.yt-checkout .form-row {
    margin-bottom: var(--yt-space-4);
}

.yt-checkout .form-row label {
    display: block;
    font-size: var(--yt-font-size-sm);
    font-weight: var(--yt-font-weight-medium);
    margin-bottom: var(--yt-space-2);
}

.yt-checkout .form-row input,
.yt-checkout .form-row select,
.yt-checkout .form-row textarea {
    width: 100%;
    padding: var(--yt-space-3) var(--yt-space-4);
    font-family: var(--yt-font-primary);
    font-size: var(--yt-font-size-sm);
    border: 1px solid var(--yt-color-cream-dark);
    border-radius: var(--yt-radius-lg);
    background-color: var(--yt-color-white);
    transition: border-color var(--yt-transition-fast);
}

.yt-checkout .form-row input:focus,
.yt-checkout .form-row select:focus,
.yt-checkout .form-row textarea:focus {
    outline: none;
    border-color: var(--yt-color-gold);
}

/* Checkout Summary Sidebar */
.yt-checkout__summary-card {
    background-color: var(--yt-color-cream-light);
    border-radius: var(--yt-radius-xl);
    padding: var(--yt-space-6);
}

.yt-checkout__summary-title {
    font-size: var(--yt-font-size-xl);
    margin-bottom: var(--yt-space-2);
}

.yt-checkout__summary-text {
    font-size: var(--yt-font-size-sm);
    color: var(--yt-color-text-light);
    margin-bottom: var(--yt-space-6);
}

.yt-checkout__illustration {
    display: flex;
    justify-content: center;
    margin-bottom: var(--yt-space-6);
}

.yt-checkout__order-title {
    font-size: var(--yt-font-size-base);
    margin-bottom: var(--yt-space-4);
}

/* Order review table */
.yt-checkout .woocommerce-checkout-review-order-table {
    width: 100%;
    margin-bottom: var(--yt-space-6);
}

.yt-checkout .woocommerce-checkout-review-order-table th,
.yt-checkout .woocommerce-checkout-review-order-table td {
    padding: var(--yt-space-2) 0;
    font-size: var(--yt-font-size-sm);
    border-bottom: 1px solid var(--yt-color-cream-dark);
}

.yt-checkout .woocommerce-checkout-review-order-table .order-total th,
.yt-checkout .woocommerce-checkout-review-order-table .order-total td {
    font-weight: var(--yt-font-weight-bold);
    padding-top: var(--yt-space-4);
}

/* Place order button */
.yt-checkout #place_order {
    display: block;
    width: 100%;
    padding: var(--yt-space-4);
    font-family: var(--yt-font-primary);
    font-size: var(--yt-font-size-base);
    font-weight: var(--yt-font-weight-semibold);
    text-align: center;
    color: var(--yt-color-text);
    background-color: var(--yt-color-gold);
    border: none;
    border-radius: var(--yt-radius-full);
    cursor: pointer;
    transition: all var(--yt-transition-fast);
}

.yt-checkout #place_order:hover {
    background-color: var(--yt-color-gold-hover);
}

/* ==========================================================================
   Thank You Page
   ========================================================================== */

.yt-thankyou {
    padding: var(--yt-space-16) 0;
    text-align: center;
}

.yt-thankyou__header {
    margin-bottom: var(--yt-space-10);
}

.yt-thankyou__title {
    font-size: var(--yt-font-size-4xl);
    margin-bottom: var(--yt-space-4);
}

.yt-thankyou__subtitle {
    font-size: var(--yt-font-size-lg);
    color: var(--yt-color-text-light);
    max-width: 500px;
    margin: 0 auto var(--yt-space-8);
}

.yt-thankyou__illustration {
    margin-bottom: var(--yt-space-10);
}

.yt-thankyou__details {
    max-width: 500px;
    margin: 0 auto var(--yt-space-10);
}

.yt-order-details {
    list-style: none;
    margin: 0;
    padding: var(--yt-space-6);
    background-color: var(--yt-color-white);
    border-radius: var(--yt-radius-xl);
}

.yt-order-details__item {
    display: flex;
    justify-content: space-between;
    padding: var(--yt-space-2) 0;
    border-bottom: 1px solid var(--yt-color-cream-dark);
}

.yt-order-details__item:last-child {
    border-bottom: none;
}

.yt-order-details__label {
    color: var(--yt-color-text-light);
}

.yt-thankyou__cta {
    margin-top: var(--yt-space-8);
}

/* ==========================================================================
   WooCommerce Notices
   ========================================================================== */

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
    padding: var(--yt-space-4) var(--yt-space-6);
    margin-bottom: var(--yt-space-6);
    border-radius: var(--yt-radius-lg);
    font-size: var(--yt-font-size-sm);
}

.woocommerce-message {
    background-color: var(--yt-color-gold-light);
    border-left: 4px solid var(--yt-color-gold);
}

.woocommerce-info {
    background-color: var(--yt-color-cream-dark);
    border-left: 4px solid var(--yt-color-terracotta);
}

.woocommerce-error {
    background-color: var(--yt-color-red-light);
    border-left: 4px solid var(--yt-color-red);
}

/* ==========================================================================
   Responsive WooCommerce
   ========================================================================== */

@media (max-width: 1024px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(3, 1fr);
    }

    .yt-cart__grid,
    .yt-checkout__grid {
        grid-template-columns: 1fr;
    }

    .yt-cart__summary,
    .yt-checkout__sidebar {
        order: -1;
    }
}

@media (max-width: 768px) {
    .woocommerce ul.products {
        grid-template-columns: repeat(2, 1fr);
    }

    .yt-product__grid {
        grid-template-columns: 1fr;
        gap: var(--yt-space-6);
    }

    .yt-product__gallery {
        position: static;
    }

    .yt-product__title {
        font-size: 1.75rem;
    }

    .yt-product__price {
        font-size: 1.25rem;
    }

    .yt-product__main-image {
        aspect-ratio: 1;
    }

    .yt-cart__item {
        grid-template-columns: 60px 1fr;
        grid-template-rows: auto auto;
    }

    .yt-cart__item-quantity,
    .yt-cart__item-subtotal,
    .yt-cart__item-remove {
        grid-column: 2;
    }

    .yt-products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Product Card Placeholder */
.yt-product-card__placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 200px;
    background-color: var(--yt-color-cream-dark);
    color: var(--yt-color-text-muted);
}

/* ==========================================================================
   Empty Cart
   ========================================================================== */

.yt-cart--empty {
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--yt-space-16) 0;
}

.yt-cart__empty-content {
    text-align: center;
    max-width: 400px;
    margin: 0 auto;
}

.yt-cart__empty-icon {
    color: var(--yt-color-gold);
    margin-bottom: var(--yt-space-6);
}

.yt-cart__empty-icon svg {
    width: 80px;
    height: 80px;
}

.yt-cart__empty-title {
    font-family: var(--yt-font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--yt-color-text);
    margin-bottom: var(--yt-space-3);
    text-transform: lowercase;
}

.yt-cart__empty-text {
    font-size: var(--yt-font-size-lg);
    color: var(--yt-color-text-muted);
    margin-bottom: var(--yt-space-8);
}

.yt-cart--empty .yt-btn {
    display: inline-flex;
}
