/* Final customer-facing refinement layer. Loaded after the legacy theme. */
html { scroll-behavior: smooth; }
body {
    margin: 0;
    color: #3d3029;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    background: linear-gradient(135deg, #fbf7f1 0%, #f2e3ce 48%, #e4c89f 100%);
}
.tf-main { min-height: 58vh; }
a, button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; }

/* Themed notifications */
.tf-toast-region { position: fixed; z-index: 5000; top: 104px; right: 24px; display: grid; gap: 12px; width: min(390px,calc(100vw - 28px)); pointer-events: none; }
.tf-toast { position: relative; display: grid; grid-template-columns: 42px minmax(0,1fr) auto 28px; align-items: center; gap: 11px; min-height: 72px; padding: 13px 13px 15px; overflow: hidden; border: 1px solid rgba(104,73,56,.14); border-radius: 16px; background: rgba(255,253,249,.97); color: #44342c; box-shadow: 0 18px 50px rgba(55,37,27,.2); backdrop-filter: blur(16px); opacity: 0; pointer-events: auto; transform: translateX(28px) scale(.98); transition: opacity .25s ease,transform .25s ease; }
.tf-toast.show { opacity: 1; transform: translateX(0) scale(1); }
.tf-toast.hide { opacity: 0; transform: translateX(22px) scale(.98); }
.tf-toast-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #eaf4ec; color: #3d7a4b; font-size: 18px; }
.tf-toast-error .tf-toast-icon { background: #fbe9e7; color: #a3433e; }
.tf-toast-info .tf-toast-icon { background: #eee8f7; color: #6e578f; }
.tf-toast-copy { min-width: 0; line-height: 1.35; }
.tf-toast-copy strong, .tf-toast-copy > span { display: block; }
.tf-toast-copy strong { margin-bottom: 3px; color: #382a24; font-size: 13px; font-weight: 700; }
.tf-toast-copy > span { color: #756860; font-size: 12px; }
.tf-toast-action { padding: 7px 9px; border-radius: 8px; background: #f1e5db; color: #674837; font-size: 11px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.tf-toast-close { width: 28px; height: 28px; padding: 0; border: 0 !important; border-radius: 50%; background: transparent !important; color: #8c7d74 !important; font-size: 20px; line-height: 1; cursor: pointer; }
.tf-toast-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; background: linear-gradient(90deg,#8ba78d,#4f7656); transform-origin: left; animation: tf-toast-progress 4.3s linear forwards; }
.tf-toast-error .tf-toast-progress { background: #b65e58; }
.tf-toast-info .tf-toast-progress { background: #826b9f; }
.tf-action-loading { cursor: wait !important; opacity: .7; pointer-events: none; }
@keyframes tf-toast-progress { to { transform: scaleX(0); } }

/* Header */
.tf-header { background: rgba(255,252,247,.93); border-color: rgba(105,73,54,.12); box-shadow: 0 8px 28px rgba(71,47,33,.08); }
.tf-header-container { min-height: 82px; padding: 12px 30px; }
.tf-logo img { height: 68px; }
.tf-nav { gap: clamp(22px, 2.4vw, 38px); }
.tf-nav a { padding: 10px 2px; color: #3d3029; font-size: 16px; font-weight: 600; }
.tf-icon-link { width: 42px; height: 42px; justify-content: center; border-radius: 50%; font-size: 21px; }
.tf-icon-link:hover { background: #f3e7dc; }

/* Homepage */
.tf-hero-slider { height: min(82vh, 790px) !important; min-height: 590px; }
.tf-hero-bg { object-position: center; }
.tf-hero-overlay, .tf-hero::after { background: linear-gradient(90deg, rgba(34,24,20,.63), rgba(64,43,33,.28) 52%, rgba(0,0,0,.06)); }
.tf-hero-content { max-width: 720px; }
.tf-hero-content h1 { font-size: clamp(48px, 5.2vw, 76px); text-shadow: 0 3px 22px rgba(0,0,0,.22); }
.tf-hero-content p { max-width: 600px; font-size: 19px; }
.tf-hero-btn { padding: 15px 34px; font-size: 15px; }
.tf-section { padding: 76px 0; }
.tf-section:nth-of-type(even) { background: rgba(255,252,247,.28); }
.tf-section-head { margin-bottom: 34px; }
.tf-section-title { margin: 0; color: #483329; font-size: clamp(30px, 3vw, 42px); font-weight: 500; }
.tf-explore-btn { padding: 11px 24px; border-color: rgba(103,69,51,.18); background: rgba(255,252,247,.8); font-size: 14px; }

/* Shared product cards */
.tf-product-card { border-color: rgba(103,69,51,.12); border-radius: 20px; background: rgba(255,253,250,.88); box-shadow: 0 12px 34px rgba(70,47,34,.09); }
.tf-product-card:hover { transform: translateY(-7px); box-shadow: 0 22px 46px rgba(70,47,34,.15); }
.tf-product-image-wrapper { aspect-ratio: 4 / 5; background: linear-gradient(145deg,#fffdf9,#f4e9de); }
.tf-product-image { height: 100%; padding: 7px; object-fit: contain; box-sizing: border-box; }
.tf-product-info { flex: 1; padding: 17px 17px 19px; gap: 11px; }
.tf-product-name { min-height: 47px; font-family: var(--font-heading); font-size: 17px; line-height: 1.38; }
.tf-price-offer, .tf-price-regular { font-size: 18px; }
.tf-add-to-cart-btn { min-height: 42px; padding: 10px 16px; border-radius: 11px; font-size: 14px; }

/* Category pages */
.tf-category-hero { height: min(58vh, 620px); min-height: 430px; overflow: hidden; }
.tf-category-hero-bg { object-position: center; }
.tf-category-hero-overlay { background: linear-gradient(0deg, rgba(35,24,19,.62), rgba(60,42,32,.12)); }
.tf-category-hero-content { bottom: 18%; max-width: 800px; }
.tf-category-hero-content h1 { margin: 0 0 10px; font-size: clamp(42px, 5vw, 66px); font-weight: 500; text-shadow: 0 3px 20px rgba(0,0,0,.25); }
.tf-category-hero-content p { margin: 0; font-size: 19px; line-height: 1.65; }
.tf-category-section { max-width: 1280px; margin: 0 auto; padding: 78px 28px 90px; }
.tf-category-title { margin: 0 0 44px; color: #402f27; font-size: clamp(34px, 4vw, 48px); font-weight: 500; }
.tf-category-section .tf-products-grid { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 26px; }

/* Cart, wishlist and checkout */
.tf-cart-section, .tf-wishlist-section, .tf-checkout-section { max-width: 1240px; padding: 72px 24px 96px; }
.tf-cart-title, .tf-wishlist-title, .tf-checkout-title { margin: 0 0 44px; color: #402f27; font-family: var(--font-heading); font-size: clamp(38px,4vw,50px); font-weight: 500; text-align: center; }
.tf-cart-item, .tf-cart-summary, .tf-wishlist-card, .tf-checkout-left, .tf-checkout-right { border: 1px solid rgba(103,69,51,.12); background: rgba(255,253,250,.82); box-shadow: 0 16px 38px rgba(70,47,34,.09); }
.tf-cart-item { padding: 22px; border-radius: 18px; }
.tf-cart-img-box { height: 170px; background: #f7eee6; }
.tf-cart-img-box img, .tf-wishlist-img-box > img { object-fit: contain; }
.tf-cart-item-title { font-family: var(--font-heading); font-size: 20px; line-height: 1.4; }
.tf-cart-item-title a { color: inherit; text-decoration: none; }
.tf-cart-qty { padding: 9px; font-size: 15px; }
.tf-cart-remove { margin-top: 9px; padding: 8px 14px; font-size: 14px; }
.tf-cart-summary { position: sticky; top: 120px; align-self: start; padding: 30px; border-radius: 20px; }
.tf-cart-summary h2, .tf-checkout-left h2 { font-family: var(--font-heading); font-size: 27px; font-weight: 500; }
.tf-summary-row, .tf-summary-total, .tf-checkout-item { font-size: 16px; }
.tf-checkout-btn, .tf-place-order-btn { padding: 14px 20px; border-radius: 12px; font-size: 15px; font-weight: 600; }
.tf-wishlist-grid { gap: 24px; }
.tf-wishlist-card { border-radius: 20px; }
.tf-wishlist-img-box { background: #f7eee6; }
.tf-wishlist-info { padding: 18px; }
.tf-wishlist-info h3 { font-family: var(--font-heading); font-size: 18px; }
.tf-wishlist-price { font-size: 17px; }
.tf-wishlist-actions button { min-height: 40px; padding: 9px 14px; border-radius: 10px; font-size: 14px; }
.tf-checkout-wrapper { gap: 28px; }
.tf-checkout-left, .tf-checkout-right { padding: 34px; border-radius: 22px; }
.tf-checkout-item { padding: 13px 0; }
.tf-checkout-total { font-size: 18px; }
.tf-checkout-right label { font-size: 14px; }
.tf-checkout-right input, .tf-checkout-right textarea, .tf-checkout-right select { min-height: 50px; padding: 13px 15px; border-color: rgba(103,69,51,.2); background: rgba(255,255,255,.72); font-size: 15px; box-sizing: border-box; }
.tf-checkout-right input:focus, .tf-checkout-right textarea:focus, .tf-checkout-right select:focus { border-color: #9a6e55; box-shadow: 0 0 0 3px rgba(154,110,85,.12); }

.tf-empty-image { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 10px; color: #806b5d; text-transform: uppercase; letter-spacing: .08em; }
.tf-empty-image img { width: min(100px,38%); height: auto; opacity: .28; }
.tf-empty-image small { font-size: 10px; }
.tf-empty-state { max-width: 650px; margin: 10px auto 0; padding: 64px 30px; border: 1px solid rgba(103,69,51,.12); border-radius: 26px; background: rgba(255,253,250,.78); box-shadow: 0 18px 48px rgba(70,47,34,.09); text-align: center; }
.tf-empty-state-icon { display: grid; place-items: center; width: 78px; height: 78px; margin: 0 auto 20px; border-radius: 50%; background: linear-gradient(145deg,#f4e6da,#fffaf5); color: #805943; font-size: 28px; box-shadow: inset 0 0 0 1px rgba(111,78,55,.1); }
.tf-empty-state h2 { margin: 0 0 8px; color: #3f2e26; font-family: var(--font-heading); font-size: 30px; font-weight: 500; }
.tf-empty-state p { margin: 0 auto 24px; color: #766961; font-size: 15px; }
.tf-empty-state-btn { display: inline-flex; min-height: 46px; align-items: center; padding: 0 24px; border-radius: 12px; background: linear-gradient(135deg,#855f49,#5f3e30); color: #fff; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 10px 24px rgba(94,61,47,.2); }

/* Authentication */
.tf-auth-section { padding: 70px 20px 90px; }
.login-card { border: 1px solid rgba(103,69,51,.12) !important; border-radius: 24px !important; background: rgba(255,253,250,.9) !important; box-shadow: 0 22px 60px rgba(70,47,34,.13) !important; }
.login-title { font-size: 30px !important; }
.login-subtitle, .form-group label, .auth-links { font-size: 14px !important; }
.form-group input { min-height: 48px; font-size: 15px !important; }
.login-btn, .social-btn { min-height: 48px; font-size: 15px !important; }
.tf-auth-alert { margin: 0 0 18px; padding: 11px 13px; border-radius: 9px; font-size: 13px; line-height: 1.5; text-align: left; }
.tf-auth-alert.error { border: 1px solid #efc4c1; background: #fff2f1; color: #963a35; }
.tf-auth-alert.success { border: 1px solid #bfddc7; background: #edf8f0; color: #2f7040; }

/* Footer */
.tf-footer { margin-top: 0; padding-top: 62px; background: rgba(255,252,247,.76); border-color: rgba(103,69,51,.13); }
.tf-footer-container { padding-bottom: 48px; gap: 48px; }
.tf-footer-logo { height: 72px; }
.tf-footer-text, .tf-footer-links a, .tf-footer-policies a, .tf-footer-social a { font-size: 15px; line-height: 1.75; }
.tf-footer-links h4, .tf-footer-policies h4, .tf-footer-social h4 { margin-top: 0; font-size: 20px; }
.tf-footer-bottom p { font-size: 14px; }
.tf-ows-logo { height: 72px !important; }

@media (max-width: 1024px) {
    .tf-category-section .tf-products-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 768px) {
    body { font-size: 15px; }
    .tf-header-container { min-height: 68px; padding: 9px 16px; }
    .tf-logo img { height: 54px; }
    .tf-hero-slider { height: 72vh !important; min-height: 520px; }
    .tf-hero-content h1 { font-size: 40px; }
    .tf-hero-content p { font-size: 17px; }
    .tf-section { padding: 55px 0; }
    .tf-carousel-track, .tf-category-section .tf-products-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
    .tf-category-hero { min-height: 370px; }
    .tf-category-hero-content p { font-size: 16px; }
    .tf-category-section { padding: 55px 14px 70px; }
    .tf-toast-region { top: 80px; right: 14px; }
    .tf-cart-wrapper { gap: 25px; }
    .tf-cart-summary { position: static; }
}
@media (max-width: 520px) {
    .tf-carousel-track { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
    .tf-product-info { padding: 13px 11px 14px; }
    .tf-product-name { min-height: 42px; font-size: 14px; }
    .tf-price-offer, .tf-price-regular { font-size: 16px; }
    .tf-section-head { align-items: center; text-align: center; }
    .tf-cart-item { grid-template-columns: 92px 1fr; gap: 14px; }
    .tf-cart-img-box { height: 120px; }
    .tf-cart-item-total { grid-column: 2; text-align: left; }
    .tf-wishlist-grid { gap: 12px; }
    .tf-wishlist-info { padding: 13px 9px; }
    .tf-wishlist-actions { flex-direction: column; }
    .tf-checkout-left, .tf-checkout-right { padding: 22px 17px; }
    .tf-toast { grid-template-columns: 38px minmax(0,1fr) 26px; }
    .tf-toast-action { grid-column: 2; width: fit-content; }
}

@media (prefers-reduced-motion: reduce) {
    .tf-toast { transition: none; }
    .tf-toast-progress { animation: none; }
}
