/* ===== Enhancement overlay (v1.0.1) ===== */

/* Announcement bar */
.announcement-bar { background: var(--c-neutral-dark); color: var(--c-bg); text-align: center; padding: 8px 0; font-size: 0.82rem; letter-spacing: 0.02em; }
.announcement-bar__text { display: inline-block; }

/* Header actions */
.header__actions { display: flex; align-items: center; gap: 14px; }
.header__icon { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--c-text); position: relative; background: none; border: 0; cursor: pointer; text-decoration: none; }
.header__icon:hover { color: var(--c-primary); text-decoration: none; }
.header__icon svg { display: block; }
.header__cart-link { position: relative; }
.cart-count { position: absolute; top: -4px; right: -4px; background: var(--c-primary); color: var(--c-bg); font-size: 0.65rem; font-weight: 700; min-width: 16px; height: 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; padding: 0 4px; font-family: var(--font-body); }

/* Search bar (slide down) */
.header__search-bar { overflow: hidden; max-height: 0; transition: max-height .25s ease; background: var(--c-surface); border-bottom: 1px solid var(--c-neutral-light); }
.header__search-bar.is-open { max-height: 80px; padding: 12px 0; }
.header__search-bar .search-form { max-width: 600px; margin: 0 auto; display: flex; padding: 0 calc(var(--space) * 0.75); }
.header__search-bar .search-field { flex: 1; padding: 8px 14px; border: 1px solid var(--c-neutral-light); border-radius: var(--radius); font-size: 0.95rem; font-family: var(--font-body); }
.header__search-bar .search-submit { margin-left: 8px; padding: 8px 20px; background: var(--c-primary); color: var(--c-bg); border: 0; border-radius: var(--radius); font-family: var(--font-heading); cursor: pointer; }

/* Nav menu items */
.header--horizontal .header__menu { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.header--horizontal .header__menu a { color: var(--c-text); font-weight: 500; font-size: 0.92rem; padding: 6px 0; position: relative; }
.header--horizontal .header__menu a:hover { color: var(--c-primary); text-decoration: none; }
.header--horizontal .header__menu a::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--c-primary); transition: width .2s ease; }
.header--horizontal .header__menu a:hover::after { width: 100%; }

/* Product card enhancements */
.products__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: calc(var(--space) * 1.5); }
.products__head .section-title { text-align: left; margin-bottom: 0; }
.products__view-all { font-family: var(--font-heading); font-size: 0.9rem; font-weight: 600; color: var(--c-primary); text-decoration: none; }
.products__view-all:hover { text-decoration: underline; }

.product-card--cell { display: flex; flex-direction: column; }
.product-card__media { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--c-neutral-light); aspect-ratio: 1; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.product-card__media:hover img { transform: scale(1.05); }
.product-card__badge { position: absolute; top: 8px; left: 8px; background: var(--c-accent); color: var(--c-bg); font-size: 0.7rem; font-weight: 700; padding: 3px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.05em; }
.product-card__info { padding: 10px 2px; display: flex; flex-direction: column; gap: 4px; }
.product-card__title { font-size: 1rem; margin: 0; font-family: var(--font-body); font-weight: 500; line-height: 1.3; }
.product-card__title a { color: var(--c-neutral-dark); }
.product-card__title a:hover { color: var(--c-primary); text-decoration: none; }
.product-card__price { font-family: var(--font-heading); font-weight: 600; color: var(--c-primary); font-size: 1.05rem; }
.product-card__price del { color: var(--c-text-muted); font-weight: 400; margin-right: 6px; font-size: 0.9rem; }
.product-card__price ins { text-decoration: none; }
.product-card__btn { display: inline-block; text-align: center; padding: 8px 16px; font-size: 0.85rem; margin-top: 6px; width: 100%; }

/* Footer enhancements */
.footer--multi { background: var(--c-neutral-dark); color: rgba(255,255,255,0.72); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: calc(var(--space) * 2); padding: calc(var(--space) * 2.5) 0; }
.footer__name { font-family: var(--font-heading); font-weight: 700; font-size: 1.4rem; color: var(--c-bg); margin-bottom: 8px; }
.footer__tagline { font-size: 0.9rem; line-height: 1.6; margin-bottom: 12px; max-width: 280px; }
.footer__addr, .footer__email a, .footer__phone a { color: rgba(255,255,255,0.7); font-size: 0.88rem; }
.footer__email a:hover, .footer__phone a:hover { color: var(--c-accent); }
.footer__heading { font-family: var(--font-heading); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-bg); margin-bottom: 12px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; }
.footer__col ul li { margin-bottom: 8px; }
.footer__col ul a { color: rgba(255,255,255,0.65); font-size: 0.9rem; text-decoration: none; }
.footer__col ul a:hover { color: var(--c-accent); }

.footer__newsletter-text { font-size: 0.88rem; margin-bottom: 12px; }
.footer__newsletter-form { display: flex; gap: 8px; margin-bottom: 16px; }
.footer__newsletter-input { flex: 1; padding: 8px 12px; border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); color: var(--c-bg); border-radius: var(--radius); font-size: 0.88rem; font-family: var(--font-body); }
.footer__newsletter-input::placeholder { color: rgba(255,255,255,0.4); }
.footer__newsletter-btn { padding: 8px 18px; white-space: nowrap; font-size: 0.85rem; }
.footer__social { display: flex; gap: 12px; }
.footer__social-link { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(255,255,255,0.15); border-radius: 50%; color: rgba(255,255,255,0.65); transition: all .2s ease; }
.footer__social-link:hover { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-bg); text-decoration: none; }

.footer__bottom { border-top: 1px solid rgba(255,255,255,0.08); padding: 16px 0; }
.footer__bottom-inner { display: flex; justify-content: space-between; align-items: center; }
.footer__bottom-inner p { margin: 0; font-size: 0.82rem; color: rgba(255,255,255,0.5); }
.footer__payment-icons { display: flex; gap: 8px; }
.footer__payment-icon { font-size: 0.7rem; font-weight: 700; color: rgba(255,255,255,0.4); padding: 3px 7px; border: 1px solid rgba(255,255,255,0.1); border-radius: 3px; letter-spacing: 0.03em; }

/* Category card enhancement */
.category-card { transition: transform .2s ease, box-shadow .2s ease; }
.category-card:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* Responsive */
@media (max-width: 900px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: calc(var(--space) * 1.5); }
    .footer__bottom-inner { flex-direction: column; gap: 8px; text-align: center; }
}
@media (max-width: 768px) {
    .header__nav { display: none; }
    .footer__grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
    .hero--centered { min-height: 70vh; }
    .hero__title--center { font-size: calc(2.2rem * var(--scale-heading, 1)); }
    .products__grid { grid-template-columns: repeat(2, 1fr) !important; }
    .footer__newsletter-form { flex-direction: column; }
    .footer__newsletter-btn { width: 100%; }
}

/* ===== v1.0.2: Carousel, cart drawer, hover swap ===== */

/* Hero carousel enhancements */
.hero--carousel { min-height: min(70vh, 620px); }
.hero--carousel .hero__track { position: relative; flex: 1; width: 100%; min-height: inherit; }
.hero--carousel .hero__slide { position: absolute; inset: 0; width: 100%; height: 100%; min-height: inherit; opacity: 0; transition: opacity .6s ease; background-size: cover; background-position: center; }
.hero--carousel .hero__slide.is-active { position: relative; opacity: 1; }
.hero--carousel .hero__bg-img { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 1; z-index: 0; }
.hero--carousel .hero__scrim { background: linear-gradient(180deg, rgba(0,0,0,.2) 0%, rgba(0,0,0,.5) 100%); z-index: 1; }
.hero--carousel .hero__inner { z-index: 2; }
.hero__dots { position: absolute; bottom: 24px; left: 0; right: 0; display: flex; justify-content: center; gap: 10px; z-index: 5; }
.hero__dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); background: transparent; cursor: pointer; padding: 0; transition: all .2s ease; }
.hero__dot.is-active { background: #fff; border-color: #fff; transform: scale(1.15); }
.hero__dot:hover { background: rgba(255,255,255,.5); }
@media (max-width: 560px) {
    .hero--carousel { min-height: 60vh; }
    .hero__dots { bottom: 16px; }
}

/* Product card hover image swap */
.product-card__media { position: relative; overflow: hidden; display: block; aspect-ratio: 1; }
.product-card__img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity .4s ease, transform .6s ease; }
.product-card__img--secondary { position: absolute; inset: 0; opacity: 0; }
.product-card__media:hover .product-card__img--primary { opacity: 0; }
.product-card__media:hover .product-card__img--secondary { opacity: 1; transform: scale(1.03); }
.product-card__media:hover .product-card__img--primary { transform: scale(1.03); }

/* AJAX add-to-cart button states */
.product-card__btn.ajax_add_to_cart { transition: background .2s ease, opacity .2s ease; }
.product-card__btn.ajax_add_to_cart.loading { opacity: .6; pointer-events: none; position: relative; }
.product-card__btn.ajax_add_to_cart.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: sf-spin .6s linear infinite; }
.product-card__btn.ajax_add_to_cart.added::after { content: '\2713'; margin-left: 4px; }
@keyframes sf-spin { to { transform: rotate(360deg); } }

/* Cart drawer */
.cart-drawer__scrim { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9998; opacity: 0; visibility: hidden; transition: opacity .3s ease, visibility .3s ease; }
.cart-drawer__scrim.is-open { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; width: 400px; max-width: 90vw; height: 100vh; background: var(--c-bg); z-index: 9999; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s ease; box-shadow: -4px 0 20px rgba(0,0,0,.12); }
.cart-drawer.is-open { transform: translateX(0); }
body.cart-drawer-open { overflow: hidden; }
.cart-drawer__header { display: flex; align-items: center; justify-content: space-between; padding: 18px 24px; border-bottom: 1px solid var(--c-neutral-light); flex-shrink: 0; }
.cart-drawer__title { font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; margin: 0; text-transform: uppercase; letter-spacing: 0.03em; }
.cart-drawer__close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--c-text); padding: 4px 8px; }
.cart-drawer__close:hover { color: var(--c-primary); }
.cart-drawer__items { flex: 1; overflow-y: auto; padding: 16px 24px; }
.cart-drawer__empty { text-align: center; color: var(--c-text-muted, #888); padding: 40px 0; font-size: 0.95rem; }
.cart-drawer__item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--c-neutral-light); }
.cart-drawer__item.is-removing { opacity: .4; }
.cart-drawer__item-img { flex-shrink: 0; width: 64px; height: 64px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--c-neutral-light); }
.cart-drawer__item-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-drawer__item-detail { flex: 1; min-width: 0; }
.cart-drawer__item-name { display: block; font-size: 0.9rem; font-weight: 600; color: var(--c-text); text-decoration: none; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-drawer__item-name:hover { color: var(--c-primary); }
.cart-drawer__item-meta { font-size: 0.82rem; color: var(--c-text-muted, #888); }
.cart-drawer__item-remove { flex-shrink: 0; font-size: 1.3rem; line-height: 1; color: var(--c-text-muted, #999); text-decoration: none; padding: 4px 8px; }
.cart-drawer__item-remove:hover { color: var(--c-primary); text-decoration: none; }
.cart-drawer__footer { flex-shrink: 0; padding: 18px 24px; border-top: 1px solid var(--c-neutral-light); display: flex; flex-direction: column; gap: 10px; }
.cart-drawer__subtotal-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.cart-drawer__subtotal-label { font-family: var(--font-heading); font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; font-size: 0.95rem; }
.cart-drawer__subtotal { font-weight: 700; font-size: 1.05rem; }
.cart-drawer__view-cart { text-align: center; }
.cart-drawer__checkout { text-align: center; }
@media (max-width: 560px) {
    .cart-drawer { width: 90vw; }
    .cart-drawer__header, .cart-drawer__items, .cart-drawer__footer { padding-left: 16px; padding-right: 16px; }
}

/* ===== v1.0.3: Shop/product image fixes, content fixes ===== */

/* Shop page: force square product images */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { text-align: center; }
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link,
.woocommerce ul.products li.product a[href*="add-to-cart"] { display: block; }
.woocommerce ul.products li.product .woocommerce-loop-product__title { font-family: var(--font-heading); font-weight: 600; font-size: 1rem; padding: 8px 0 4px; }
.woocommerce ul.products li.product .price { color: var(--c-primary); font-weight: 700; font-size: 1.05rem; }
.woocommerce ul.products li.product .price del { color: var(--c-text-muted, #999); font-weight: 400; }
/* ===== v1.0.4: Square product image wrapper (shop + related) ===== */
/* v1.0.6: Neutralize WooCommerce clearfix pseudo-elements (::before/::after with
   content:" " + display:table) which become grid items in a display:grid container
   and occupy the first grid cell, leaving the first row with an empty leading slot.
   Also reset WooCommerce float-era margins (0 3.8% 2.992em 0) that shrink grid items. */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.woocommerce-page ul.products::before,
.woocommerce-page ul.products::after { content: none !important; display: none !important; }

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product { width: auto !important; float: none !important; margin: 0 !important; }

/* Square image container - same pattern as homepage .product-card__media */
.woocommerce ul.products li.product .sf-product-img {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--c-neutral-light);
}
.woocommerce ul.products li.product .sf-product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    margin: 0;
}
/* Fallback: also force square on any unwrapped loop images */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link > img {
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: var(--radius);
}
.single-product-main .related ul.products li.product .sf-product-img img,
.single-product-main .related ul.products li.product img { aspect-ratio: 1; object-fit: cover; }
.woocommerce .products .product .button { background: var(--c-primary); color: var(--c-bg); border-radius: var(--radius); padding: 8px 16px; font-size: 0.85rem; font-family: var(--font-body); margin-top: 8px; }
.woocommerce .products .product .button:hover { background: var(--c-neutral-dark); }

/* Shop page layout: full-width, no sidebar */
.shop--sidebar-left { display: block !important; }
.shop__main { width: 100%; float: none; }
.woocommerce .woocommerce-result-count { color: var(--c-text-muted, #888); }
.woocommerce .woocommerce-ordering select { padding: 6px 12px; border: 1px solid var(--c-neutral-light); border-radius: var(--radius); font-family: var(--font-body); }

/* Single product page */
.single-product-main { padding: 32px 0; }
.single-product-main .product { display: flex; flex-wrap: wrap; gap: 40px; }
.single-product-main .woocommerce-product-gallery { width: 100%; max-width: 500px; flex-shrink: 0; }
.single-product-main .summary { flex: 1; min-width: 280px; }
.single-product-main .product_title { font-family: var(--font-heading); font-size: 2rem; font-weight: 700; margin-bottom: 12px; }
.single-product-main .price { font-size: 1.5rem; color: var(--c-primary); font-weight: 700; margin-bottom: 16px; }
.single-product-main .woocommerce-product-details__short-description { margin-bottom: 20px; line-height: 1.6; color: var(--c-text); }
.single-product-main .woocommerce-product-details__short-description p { margin-bottom: 12px; }
.single-product-main form.cart { margin: 20px 0; }
.single-product-main .single_add_to_cart_button { background: var(--c-primary); color: var(--c-bg); border: 0; border-radius: var(--radius); padding: 12px 32px; font-size: 1rem; font-family: var(--font-body); font-weight: 600; cursor: pointer; }
.single-product-main .single_add_to_cart_button:hover { background: var(--c-neutral-dark); }
.single-product-main .quantity .qty { padding: 8px; border: 1px solid var(--c-neutral-light); border-radius: var(--radius); width: 60px; }

/* Product tabs */
.single-product-main .woocommerce-tabs { width: 100%; margin-top: 40px; }
.single-product-main .woocommerce-tabs ul.tabs { list-style: none; padding: 0; margin: 0 0 20px; border-bottom: 2px solid var(--c-neutral-light); display: flex; gap: 0; }
.single-product-main .woocommerce-tabs ul.tabs li { margin: 0; padding: 0; }
.single-product-main .woocommerce-tabs ul.tabs li a { display: block; padding: 10px 20px; color: var(--c-text-muted, #888); text-decoration: none; font-family: var(--font-heading); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.single-product-main .woocommerce-tabs ul.tabs li.active a { color: var(--c-primary); border-bottom-color: var(--c-primary); }
.single-product-main .woocommerce-Tabs-panel { padding: 20px 0; line-height: 1.7; }
.single-product-main .woocommerce-Tabs-panel h2 { font-family: var(--font-heading); font-size: 1.3rem; margin-bottom: 12px; }

/* Related products */
.single-product-main .related { width: 100%; margin-top: 50px; }
.single-product-main .related > h2 { font-family: var(--font-heading); font-size: 1.5rem; margin-bottom: 24px; }
.single-product-main .related ul.products li.product img { aspect-ratio: 1; object-fit: cover; }

/* Remove WooCommerce breadcrumb default styling issues */
.woocommerce-breadcrumb { font-size: 0.85rem; color: var(--c-text-muted, #888); margin-bottom: 16px; }
.woocommerce-breadcrumb a { color: var(--c-text); }

/* Shop page header */
.woocommerce-products-header h1 { font-family: var(--font-heading); font-size: 2rem; margin-bottom: 8px; }
.woocommerce-products-header .term-description { margin-bottom: 24px; line-height: 1.6; }

/* Pagination */
.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span { padding: 8px 14px; border: 1px solid var(--c-neutral-light); margin: 0 2px; border-radius: var(--radius); }
.woocommerce nav.woocommerce-pagination ul li .current { background: var(--c-primary); color: var(--c-bg); border-color: var(--c-primary); }

/* General content pages */
.page .entry-content { line-height: 1.7; }
.page .entry-content h2 { font-family: var(--font-heading); font-size: 1.6rem; margin: 24px 0 12px; }
.page .entry-content h3 { font-family: var(--font-heading); font-size: 1.25rem; margin: 20px 0 10px; }
.page .entry-content p { margin-bottom: 14px; }
.page .entry-content ul, .page .entry-content ol { margin-bottom: 14px; padding-left: 20px; }
.page .entry-content li { margin-bottom: 6px; }
