/* ============================================================
   HIMAAL PURE — WooCommerce Template Overrides
   ============================================================ */

/* ── Shop Archive ── */
.hp-shop { padding: 0 var(--margin-mobile) 1.5rem; }

.hp-shop__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0 0.75rem;
    gap: 0.5rem;
}

.hp-shop__title {
    font-family: var(--font-display);
    font-size: var(--text-headline-md);
    font-weight: 600;
    color: var(--color-primary);
    margin: 0;
}

.hp-shop__count {
    font-size: var(--text-label-badge);
    color: var(--color-on-surface-variant);
    white-space: nowrap;
}

.hp-shop__filters {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.25rem 0 0.75rem;
    scrollbar-width: none;
}

.hp-shop__filters::-webkit-scrollbar { display: none; }

/* Product list in shop */
.hp-shop .hp-product-stack { gap: 0.75rem; }

/* WooCommerce pagination */
.woocommerce-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    padding: 1.5rem 0;
}

.woocommerce-pagination ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.woocommerce-pagination ul li a,
.woocommerce-pagination ul li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    font-size: var(--text-label-md);
    font-weight: 600;
    color: var(--color-primary);
    background-color: var(--color-surface-container-low);
    transition: background-color 0.15s;
}

.woocommerce-pagination ul li span.current {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}

/* ── Single Product ── */
.hp-product { padding-bottom: 7rem; }

.hp-product__gallery {
    position: relative;
    overflow: hidden;
    background-color: var(--color-surface-container);
}

.hp-gallery {
    position: relative;
    overflow: hidden;
    touch-action: pan-y;
}

.hp-gallery__track {
    display: flex;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.hp-gallery__slide {
    min-width: 100%;
    position: relative;
}

.hp-gallery__slide img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.hp-gallery__dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 0.75rem 0;
}

.hp-gallery__dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: var(--color-outline-variant);
    transition: background-color 0.2s, width 0.2s;
    cursor: pointer;
    border: none;
    padding: 0;
}

.hp-gallery__dot.active {
    background-color: var(--color-primary);
    width: 18px;
    border-radius: 3px;
}

.hp-product__info {
    padding: 0 var(--margin-mobile);
}

.hp-product__badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.hp-product__name {
    font-family: var(--font-display);
    font-size: clamp(22px, 5.5vw, 32px);
    line-height: 1.2;
    color: var(--color-primary);
    font-weight: 600;
    margin: 0 0 0.5rem;
}

.hp-product__rating-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.hp-product__rating-count {
    font-size: var(--text-label-md);
    color: var(--color-on-surface-variant);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.hp-product__price-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hp-product__price {
    font-size: 28px;
    font-weight: 700;
    color: var(--color-primary);
    line-height: 1;
}

.hp-product__price del {
    font-size: 18px;
    color: var(--color-outline);
    font-weight: 400;
}

.hp-product__save-badge {
    background-color: var(--color-secondary-fixed);
    color: var(--color-on-secondary-fixed);
    font-size: var(--text-label-badge);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
}

/* Purchase Options */
.hp-purchase-options {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
    margin-bottom: 1rem;
    background-color: var(--color-surface-sand-subtle);
    padding: 0.75rem;
    border-radius: var(--radius-xl);
}

.hp-purchase-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: box-shadow 0.2s, background-color 0.2s;
    background-color: var(--color-surface-container-low);
    border: none;
    width: 100%;
    text-align: left;
}

.hp-purchase-option.selected {
    background-color: var(--color-surface);
    box-shadow: var(--shadow-md);
    outline: 2px solid var(--color-primary);
    outline-offset: -2px;
}

.hp-purchase-option__label {
    flex: 1;
    min-width: 0;
}

.hp-purchase-option__title {
    font-size: var(--text-label-md);
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 0.02em;
    display: block;
    margin-bottom: 2px;
}

.hp-purchase-option__sub {
    font-size: var(--text-body-sm);
    color: var(--color-on-surface-variant);
    display: block;
}

.hp-purchase-option__price {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

.hp-sub-save-badge {
    background-color: var(--color-secondary);
    color: var(--color-on-secondary);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    display: inline-block;
    margin-top: 3px;
}

/* Quantity + ATC row */
.hp-atc-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 1rem;
}

.hp-qty-stepper {
    display: flex;
    align-items: center;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface-container-low);
    overflow: hidden;
    flex-shrink: 0;
}

.hp-qty-stepper button {
    width: 44px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
    font-size: 20px;
    transition: background-color 0.15s;
}

.hp-qty-stepper button:hover { background-color: var(--color-surface-sand-subtle); }

.hp-qty-stepper input {
    width: 44px;
    height: 52px;
    text-align: center;
    font-size: var(--text-label-lg);
    font-weight: 700;
    color: var(--color-primary);
    background: none;
    border: none;
    outline: none;
    -moz-appearance: textfield;
}

.hp-qty-stepper input::-webkit-inner-spin-button,
.hp-qty-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; }

/* Accordions (product detail) */
.hp-accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 1.25rem var(--margin-mobile);
}

.hp-accordions .hp-accordion {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Reviews section (product) */
.hp-product-reviews {
    padding: 0 var(--margin-mobile) 1.5rem;
}

.hp-product-reviews__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Related products */
.hp-related {
    padding: 1.5rem var(--margin-mobile);
    background-color: var(--color-surface-sand-subtle);
}

.hp-related__title {
    font-family: var(--font-display);
    font-size: var(--text-headline-sm);
    color: var(--color-primary);
    margin: 0 0 0.875rem;
}

/* WooCommerce Notices */
.woocommerce-notices-wrapper { padding: 0 var(--margin-mobile); }

/* Cart Page */
.hp-cart { padding: 0 var(--margin-mobile); }

.hp-cart__items { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.25rem; }

.hp-cart-item {
    display: flex;
    gap: 0.75rem;
    background-color: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    box-shadow: var(--shadow-sm);
    align-items: flex-start;
}

.hp-cart-item__img {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background-color: var(--color-surface-container);
    flex-shrink: 0;
}

.hp-cart-item__img img { width: 100%; height: 100%; object-fit: cover; }

.hp-cart-item__info { flex: 1; min-width: 0; }

.hp-cart-item__name {
    font-size: var(--text-label-md);
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 4px;
}

.hp-cart-item__price {
    font-size: 17px;
    font-weight: 700;
    color: var(--color-primary);
}

.hp-cart__totals {
    background-color: var(--color-surface);
    border-radius: var(--radius-xl);
    padding: 1rem;
    box-shadow: var(--shadow-md);
}

.hp-cart__total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    font-size: var(--text-body-md);
    color: var(--color-charcoal-body);
    border-bottom: 1px solid var(--color-border-warm-hairline);
}

.hp-cart__total-row:last-child { border-bottom: none; }

.hp-cart__total-row.grand {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 18px;
    padding-top: 0.75rem;
}

/* Checkout */
.hp-checkout { padding: 0 var(--margin-mobile); }

.hp-checkout__section {
    margin-bottom: 1.5rem;
}

.hp-checkout__section-title {
    font-family: var(--font-display);
    font-size: var(--text-headline-sm);
    color: var(--color-primary);
    margin: 0 0 0.875rem;
}

/* Order Confirmation */
.hp-thankyou {
    text-align: center;
    padding: 2rem var(--margin-mobile);
}

.hp-thankyou__icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--color-primary-fixed);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

/* WooCommerce table overrides */
table.shop_table {
    width: 100%;
    border-collapse: collapse;
}

table.shop_table td,
table.shop_table th {
    padding: 0.625rem 0.5rem;
    font-size: var(--text-body-sm);
    border-bottom: 1px solid var(--color-border-warm-hairline);
    vertical-align: middle;
}

table.shop_table th {
    font-size: var(--text-label-md);
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Account page */
.woocommerce-account .woocommerce-MyAccount-navigation {
    background-color: var(--color-surface-container-low);
    border-radius: var(--radius-xl);
    padding: 0.5rem;
    margin-bottom: 1.25rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li a {
    display: block;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: var(--text-label-md);
    font-weight: 600;
    color: var(--color-primary);
    transition: background-color 0.15s;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation ul li a:hover {
    background-color: var(--color-primary);
    color: var(--color-on-primary);
}

/* Product variation selects */
.variations select {
    height: 48px;
    border-radius: var(--radius-lg);
    background-color: var(--color-surface-container-low);
    border: none;
    padding: 0 0.75rem;
    font-family: var(--font-body);
    font-size: var(--text-body-md);
    color: var(--color-charcoal-body);
    width: 100%;
    outline: none;
    box-shadow: var(--shadow-sm);
    appearance: none;
}
