/*
 * Lila Cut — WooCommerce stylesheet
 * Loaded only on WooCommerce pages (cart, checkout, shop, product, account).
 * Re-skins WooCommerce's default markup to match the Lila Cut palette and typography
 * (Fraunces / Inter / Space Grotesk + aubergine + off-white + magenta accents).
 * Does not redesign cart/checkout layouts — those are not in the design source.
 */

/* Container & basic spacing ------------------------------------------------ */
.woocommerce,
.woocommerce-page {
    color: var(--aubergine);
    font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
}

.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.woocommerce-page h1,
.woocommerce-page h2,
.woocommerce-page h3,
.woocommerce-page h4 {
    font-family: 'Fraunces', ui-serif, Georgia, serif;
    font-feature-settings: "ss01", "ss02";
    letter-spacing: -0.02em;
    font-variation-settings: "opsz" 144;
    color: var(--aubergine);
}

.woocommerce h1 { font-size: clamp(36px, 5vw, 64px); line-height: 1.1; margin-bottom: 32px; }
.woocommerce h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.15; margin: 32px 0 16px; }
.woocommerce h3 { font-size: 22px; line-height: 1.25; margin: 18px 0 10px; }

/* Buttons ------------------------------------------------------------------ */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce-page a.button,
.woocommerce-page button.button,
.woocommerce-page input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit.alt,
.woocommerce-page a.button.alt,
.woocommerce-page button.button.alt,
.woocommerce-page input.button.alt,
.woocommerce .button.checkout,
.woocommerce-page .button.checkout {
    background: var(--aubergine);
    color: var(--off);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 14px 24px;
    border-radius: 999px;
    border: 1px solid var(--aubergine);
    transition: background 0.28s var(--ease-std), color 0.28s var(--ease-std);
    text-shadow: none;
    box-shadow: none;
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce-page a.button:hover,
.woocommerce-page button.button:hover,
.woocommerce-page input.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover,
.woocommerce-page a.button.alt:hover,
.woocommerce-page button.button.alt:hover,
.woocommerce-page input.button.alt:hover {
    background: var(--magenta);
    color: var(--off);
    border-color: var(--magenta);
}

.woocommerce a.button.disabled,
.woocommerce a.button:disabled,
.woocommerce button.button.disabled,
.woocommerce button.button:disabled {
    opacity: 0.5;
}

/* Forms / inputs ----------------------------------------------------------- */
.woocommerce form .form-row label,
.woocommerce-page form .form-row label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--aubergine);
    opacity: 0.7;
    margin-bottom: 6px;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce-page form .form-row input.input-text,
.woocommerce-page form .form-row textarea,
.woocommerce .select2-container--default .select2-selection--single {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 12px 14px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
    color: var(--aubergine);
    line-height: 1.4;
    transition: border-color 0.3s var(--ease-std);
}

.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus,
.woocommerce-page form .form-row input.input-text:focus,
.woocommerce-page form .form-row textarea:focus {
    border-color: var(--aubergine);
    outline: none;
}

.woocommerce form .form-row .required {
    color: var(--magenta);
    text-decoration: none;
}

/* Cart table --------------------------------------------------------------- */
.woocommerce table.shop_table,
.woocommerce-page table.shop_table {
    border: 1px solid var(--line);
    border-radius: 6px;
    border-collapse: separate;
    border-spacing: 0;
}

.woocommerce table.shop_table th,
.woocommerce-page table.shop_table th {
    background: transparent;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--aubergine);
    border-bottom: 1px solid var(--line);
    padding: 16px 12px;
}

.woocommerce table.shop_table td,
.woocommerce-page table.shop_table td {
    padding: 16px 12px;
    border-top: 1px solid var(--line);
    color: var(--aubergine);
}

.woocommerce table.shop_table .product-thumbnail img {
    border-radius: 4px;
}

.woocommerce .quantity .qty {
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    color: var(--aubergine);
    width: 64px;
    text-align: center;
}

/* Cart totals -------------------------------------------------------------- */
.woocommerce .cart_totals h2,
.woocommerce-page .cart_totals h2 {
    font-family: 'Fraunces', serif;
    font-size: clamp(28px, 3vw, 40px);
}

.woocommerce-cart-form__cart-item .product-name a,
.woocommerce-cart-form .product-name a {
    color: var(--aubergine);
    text-decoration: none;
    font-family: 'Fraunces', serif;
    font-size: 18px;
}

.woocommerce-cart-form__cart-item .product-name a:hover,
.woocommerce-cart-form .product-name a:hover {
    color: var(--magenta);
}

/* Price displays ----------------------------------------------------------- */
.woocommerce .price,
.woocommerce-page .price,
.woocommerce ins {
    font-family: 'Space Grotesk', sans-serif;
    color: var(--aubergine);
    background: transparent;
    text-decoration: none;
}

.woocommerce del {
    opacity: 0.45;
}

/* Messages, info, error ---------------------------------------------------- */
.woocommerce-message,
.woocommerce-info,
.woocommerce-error,
.woocommerce-noreviews,
.woocommerce p.no-comments {
    background: var(--off-2);
    color: var(--aubergine);
    border-top: 3px solid var(--magenta);
    border-radius: 4px;
    padding: 16px 20px 16px 56px;
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

.woocommerce-message::before,
.woocommerce-info::before,
.woocommerce-error::before {
    color: var(--magenta);
}

.woocommerce-error {
    border-top-color: #d11d2a;
}

.woocommerce-error::before {
    color: #d11d2a;
}

/* Shop / archive grid ------------------------------------------------------ */
.woocommerce ul.products,
.woocommerce-page ul.products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 32px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    width: auto;
    margin: 0;
    padding: 0;
    float: none;
    text-align: left;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title,
.woocommerce-page ul.products li.product .woocommerce-loop-product__title {
    font-family: 'Fraunces', serif;
    font-size: 22px;
    line-height: 1.1;
    color: var(--aubergine);
    padding: 12px 0 4px;
    margin: 0;
}

.woocommerce ul.products li.product img,
.woocommerce-page ul.products li.product img {
    border-radius: 6px;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    margin-bottom: 0;
    transition: transform 0.4s var(--ease-over);
}

.woocommerce ul.products li.product:hover img {
    transform: translateY(-6px);
}

.woocommerce ul.products li.product .price {
    font-size: 14px;
    color: var(--aubergine);
    opacity: 0.8;
    display: block;
    margin: 0 0 12px;
}

/* Pagination ---------------------------------------------------------------*/
.woocommerce nav.woocommerce-pagination ul,
.woocommerce-page nav.woocommerce-pagination ul {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li,
.woocommerce-page nav.woocommerce-pagination ul li {
    border: none;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span,
.woocommerce-page nav.woocommerce-pagination ul li a,
.woocommerce-page nav.woocommerce-pagination ul li span {
    background: transparent;
    color: var(--aubergine);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a:hover {
    background: var(--aubergine);
    color: var(--off);
    border-color: var(--aubergine);
}

/* Single product ----------------------------------------------------------- */
.woocommerce div.product .product_title {
    font-family: 'Fraunces', serif;
    font-size: clamp(36px, 5vw, 64px);
    line-height: 1.05;
    color: var(--aubergine);
    margin-bottom: 18px;
}

.woocommerce div.product p.price,
.woocommerce div.product span.price {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 24px;
    color: var(--aubergine);
    margin-bottom: 18px;
}

.woocommerce div.product .woocommerce-product-details__short-description {
    font-size: 17px;
    line-height: 1.6;
    color: var(--aubergine);
    margin-bottom: 24px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs {
    padding: 0 0 0 8px;
    border-bottom: 1px solid var(--line);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li a {
    color: var(--aubergine);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 14px 16px;
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active {
    border-bottom-color: var(--magenta);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
    color: var(--aubergine);
}

.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after {
    display: none;
}

/* Onsale badge ------------------------------------------------------------- */
.woocommerce span.onsale {
    background: var(--magenta);
    color: var(--off);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 4px 12px;
    min-width: auto;
    min-height: auto;
    line-height: 1.4;
    top: 12px;
    left: 12px;
    right: auto;
}

/* Checkout layout ---------------------------------------------------------- */
.woocommerce-checkout #payment {
    background: var(--off-2);
    border-radius: 6px;
}

.woocommerce-checkout #payment ul.payment_methods {
    border-bottom: 1px solid var(--line);
}

.woocommerce-checkout #payment div.payment_box {
    background: var(--off);
    color: var(--aubergine);
}

.woocommerce-checkout #payment div.payment_box::before {
    border-bottom-color: var(--off);
}

/* Account / login ---------------------------------------------------------- */
.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li {
    border-bottom: 1px solid var(--line);
    padding: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    color: var(--aubergine);
    padding: 12px 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a {
    color: var(--magenta);
}

/* Breadcrumbs -------------------------------------------------------------- */
.woocommerce .woocommerce-breadcrumb {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--aubergine);
    opacity: 0.6;
    margin: 0 0 32px;
}

.woocommerce .woocommerce-breadcrumb a {
    color: var(--aubergine);
}

/* Mobile responsiveness ---------------------------------------------------- */
@media (max-width: 768px) {
    .woocommerce table.shop_table_responsive tr td,
    .woocommerce-page table.shop_table_responsive tr td {
        text-align: right;
    }
}
