/* ==========================================================================
   Literature Fiction Books - CSS Revamp (advanced)
   Load AFTER style.css:
   <link rel="stylesheet" href="style.css">
   <link rel="stylesheet" href="revamp.css">

   NOTE: body background is unchanged (var(--paper)), exactly as before.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,500;0,9..144,600;1,9..144,400&family=Source+Sans+3:wght@400;500;600&display=swap');

/* ---------- 0. Design tokens ---------- */
:root {
  --paper: #f8f7f3;
  --paper-2: #efede6;
  --ink: #1b1f24;
  --ink-soft: #4d545c;
  --green: #1e3d36;        /* bookcloth green: dark surfaces */
  --green-2: #2a5248;
  --brass: #a8782b;        /* accent: buttons, links, prices */
  --brass-dark: #85601f;
  --brass-a18: rgba(168,120,43,.18);
  --danger: #a3322b;
  --rule: #d9d5cb;
  --white: #ffffff;

  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-ui: 'Source Sans 3', 'Segoe UI', Roboto, Arial, sans-serif;

  --r-sm: 3px;             /* inputs, buttons */
  --r-md: 6px;             /* panels, modals */
  --shadow-book: 0 1px 2px rgba(20,25,30,.18), 0 8px 18px -6px rgba(20,25,30,.28);
  --shadow-pop: 0 14px 40px -12px rgba(20,25,30,.35);

  --ease-out: cubic-bezier(.2,.75,.2,1);
  --header-offset: 96px;   /* used for anchor scrolling under a sticky header */
}

/* registered property: lets the cover sheen animate smoothly (13.3) */
@property --sheen {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 38%;
}

/* ---------- 1. Base ---------- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-offset);
  scrollbar-color: var(--brass) var(--paper-2);
  scrollbar-width: thin;
  accent-color: var(--brass);
}

body {
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);          /* unchanged */
  -webkit-font-smoothing: antialiased;
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
p { color: var(--ink-soft); text-wrap: pretty; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-optical-sizing: auto;         /* Fraunces picks the right optical size */
  font-weight: 600;
  line-height: 1.2;
  color: var(--ink);
  text-shadow: none;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

a { color: var(--ink); }
a:hover { color: var(--brass); }

::selection { background: var(--brass); color: var(--white); text-shadow: none; }
::-moz-selection { background: var(--brass); color: var(--white); text-shadow: none; }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

.section-padding { padding: 72px 0; }

/* skip link (add <a class="skip-link" href="#main">Skip to content</a> after <body>) */
.skip-link {
  position: fixed;
  top: 8px; left: 8px;
  z-index: 10000;
  padding: 10px 16px;
  background: var(--green);
  color: var(--white);
  border-radius: var(--r-sm);
  transform: translateY(-160%);
  transition: transform .25s var(--ease-out);
}
.skip-link:focus { transform: none; color: var(--white); }

/* ---------- 2. Header ---------- */
.header-area, .header-top-area { background: var(--paper); border-bottom: 1px solid var(--rule); }

/* frosted-glass header where the browser supports it (matters when it is sticky) */
@supports (backdrop-filter: blur(1px)) {
  .header-area {
    background: rgba(248,247,243,.86);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    backdrop-filter: saturate(1.4) blur(10px);
  }
}

.mainmenu nav ul#nav li a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink);
  padding: 40px 14px;
}
.mainmenu nav ul#nav li::before { background: var(--brass); height: 3px; }
.mainmenu nav ul#nav li a:hover { background: transparent; color: var(--brass-dark); }

.mainmenu ul li ul {
  background: var(--white);
  border: 1px solid var(--rule);
  border-top: 3px solid var(--brass);
  box-shadow: var(--shadow-pop);
}
.mainmenu nav ul#nav li ul.sub-menu li a { font-weight: 500; }
.mainmenu nav ul#nav li ul.sub-menu li a:hover { background: var(--paper-2); }

.header-right li a { color: var(--ink); }
.header-right li a:hover { color: var(--brass); }
.header-right ul li a span {
  background: var(--green);
  color: var(--white);
  font-family: var(--font-ui);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.add-to-cart-product {
  background: var(--white);
  border-top: 3px solid var(--brass);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: var(--shadow-pop);
}
.cart-product { border-top: 1px solid var(--rule); }

/* ---------- 3. Slider / hero ---------- */
.layer-1 h2.title-1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(38px, 6vw, 76px);
  line-height: 1.05;
  text-transform: none;
  letter-spacing: -0.02em;
}
.layer-2 p.title-2 {
  font-size: 17px;
  line-height: 1.7;
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}
.layer-3 a.title-3 {
  background: var(--brass);
  color: var(--white);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .03em;
  text-transform: none;
  padding: 13px 34px;
}
.layer-3 a.title-3:hover { background: var(--brass-dark); }

.layer-4 .title-4 input {
  border-radius: var(--r-sm) 0 0 var(--r-sm);
  font-family: var(--font-ui);
}
.layer-4 form.title-4 button {
  background: var(--green);
  color: var(--white);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
}
.layer-4 form.title-4 button:hover { background: var(--green-2); }

/* ---------- 4. Section titles ---------- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  color: var(--ink);
  text-transform: none;
  letter-spacing: -0.01em;
  border: 0;
  padding: 0 0 22px;
  margin-bottom: 8px;
}
.section-title::before { display: none; }
/* fleuron divider with hairlines either side */
.section-title::after {
  content: "\2766";
  display: block;
  position: static;
  width: 200px;
  height: auto;
  margin: 12px auto 0;
  background:
    linear-gradient(var(--rule), var(--rule)) left 50% / 74px 1px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right 50% / 74px 1px no-repeat;
  color: var(--brass);
  font-size: 20px;
  line-height: 1;
  text-align: center;
}
.banner-title > p { color: var(--ink-soft); max-width: 640px; margin: 0 auto; padding: 0 20px; }

/* ---------- 5. Book cards ---------- */
.single-banner {
  position: relative;                 /* needed for the price ribbon + page corner */
  border: 0;
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(20,25,30,.08);
  transition: box-shadow .3s ease;
}
.single-banner:hover,
.single-banner:focus-within {
  box-shadow: var(--shadow-pop);      /* the card stays put; only the book moves (13.3) */
}
.single-banner-image-wrapper, .product-wrapper { background: var(--paper-2); }
.product-wrapper { padding: 24px; }

/* cover: give every book image the look of a physical book */
.single-banner-image-wrapper img,
.single-banner .product-image img,
.left-item img {
  box-shadow: var(--shadow-book);
  border-radius: 2px 4px 4px 2px;
}

.banner-bottom {
  border-top: 1px solid var(--rule);
  padding: 14px 16px;
  background: var(--white);
}
.banner-bottom > a,
.banner-bottom-title > a,
.online-banner-area .banner-bottom a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--ink);                  /* was "--white" (invalid, text vanished on white) */
  text-wrap: balance;
}
.banner-bottom-title > a:hover { color: var(--brass); }
.banner-bottom.text-center::before { background: var(--brass); }

.price {
  background: var(--green);
  color: var(--white);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  font-variant-numeric: lining-nums tabular-nums;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  top: 14px;
  right: 14px;
}
.old-price { opacity: .7; }
.single-banner:hover .price,
.online-banner-area .banner-list .single-banner:hover .price { color: var(--white); }

.single-banner-image-wrapper::before { background: rgba(30,61,54,.62); }
.functional-buttons > a { border-color: rgba(255,255,255,.85); }
.functional-buttons > a:hover { background: var(--brass); border-color: var(--brass); }

.rating-icon i { color: var(--brass); }
.icolor { color: var(--brass) !important; }

/* tabs above product lists */
.tab-menu ul.nav-tabs > li::before { background: var(--rule); }
.tab-menu ul.nav-tabs > li a {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: .04em;
  text-transform: none;
  color: var(--ink-soft);
}
.tab-menu ul.nav-tabs > li.active > a,
.tab-menu ul.nav-tabs > li > a:hover { color: var(--green); border-bottom: 2px solid var(--brass); }

/* carousel arrows */
.indicator-style.owl-theme .owl-controls .owl-buttons div {
  border-color: var(--ink-soft);
  color: var(--ink-soft);
  border-radius: var(--r-sm);
}
.indicator-style.owl-theme .owl-controls .owl-buttons div:hover {
  background: var(--green); border-color: var(--green); color: var(--white);
}

/* ---------- 6. Info strip, testimonials, counters ---------- */
.shop-info-area { position: relative; }
.shop-info-area::before {
  content: ""; position: absolute; inset: 0; background: rgba(20,32,29,.78);
}
.shop-info-area > * { position: relative; }
.shop-info-icon { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); }
.shop-info-content h2 { font-family: var(--font-display); text-transform: none; font-size: 20px; color: var(--white); }
.shop-info-content > p { color: rgba(255,255,255,.85); }
.shop-info-content > a { border-radius: var(--r-sm); padding: 8px 24px; }
.shop-info-content > a:hover, .single-shop-info:hover .shop-info-icon { background: var(--brass); border-color: var(--brass); }

.testimonial-area { position: relative; }
.testimonial-area::before { content: ""; position: absolute; inset: 0; background: rgba(20,32,29,.82); }
.testimonial-area > * { position: relative; }
.testimonial-title > h2 { font-family: var(--font-display); text-transform: none; font-size: 28px; color: var(--white); }
.testmonial-info {
  position: relative;
  border-radius: var(--r-md);
  font-family: var(--font-display);
  font-style: italic;
  font-size: 17px;
  line-height: 1.7;
  box-shadow: var(--shadow-pop);
  margin-top: 60px;
  hyphens: auto;
  text-wrap: pretty;
}
.single-testimonial > img { border-color: var(--brass); }
.testimonial-area h3 { font-family: var(--font-ui); font-style: normal; font-weight: 600; }

.counter-area { background: var(--green); }
.counter-info { font-family: var(--font-display); }
.fcount span.counter { font-size: 48px; color: var(--white); font-variant-numeric: tabular-nums; }
.counter-info > h3 { font-family: var(--font-ui); font-size: 15px; font-weight: 500; }
.counter-info::before { background: rgba(255,255,255,.3); }

/* ---------- 7. Blog + newsletter ---------- */
.single-blog { background: var(--white); border-radius: var(--r-md); overflow: hidden; }
.single-blog img { margin-bottom: 20px; }
.blog-info a h2 { font-size: 20px; }
.blog-info-bottom { color: var(--ink-soft); font-weight: 400; padding: 0 24px 20px; }

.newsletter-title > h2 { font-family: var(--font-display); font-size: 28px; color: var(--ink); }
.search-box input {
  border: 1px solid var(--rule);
  background: var(--white);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
}
.search-box input:focus { border-color: var(--brass); outline: none; }

/* ---------- 8. Buttons (one system for the whole site) ---------- */
.btn-search, .btn-default, .btn-primary,
.cart-btn, .add-to-wishlist, .button.button-small,
.quick-add-to-cart .single_add_to_cart_button,
.subtotal-main-area > a, .discount-middle > a,
.shopingcart-bottom-area a, .wishlist-bottom-link > a,
.product-cart-details > input[type="submit"],
.input-message .btn-default, .create-account-form .btn-default {
  background: var(--brass);
  border: 1px solid var(--brass);
  color: var(--white);
  border-radius: var(--r-sm);
  font-family: var(--font-ui);
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.btn-search { border-radius: var(--r-sm); }
.btn-search:hover, .btn-default:hover, .btn-primary:hover,
.cart-btn:hover, .add-to-wishlist:hover,
.quick-add-to-cart .single_add_to_cart_button:hover,
.subtotal-main-area > a:hover, .discount-middle > a:hover,
.shopingcart-bottom-area a:hover, .wishlist-bottom-link > a:hover,
.product-cart-details > input[type="submit"]:hover,
.input-message .btn-default:hover {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

/* ---------- 9. Footer ---------- */
.footer-top-area { background: #0B1120; color: rgba(255,255,255,.82); padding: 48px 0 24px; }
.footer-title { font-family: var(--font-display); font-size: 19px; color: var(--white); }
.footer-list li a { color: rgba(255,255,255,.8); font-size: 14px; }
.footer-list li a:hover { color: var(--white); }
.footer-list li a::before { background: var(--brass); }
.footer-list li:hover a::before { background: var(--white); }
.single-footer.footer-newsletter input { color: var(--white); border-bottom-color: rgba(255,255,255,.5); }
.single-footer.footer-newsletter input::placeholder { color: rgba(255,255,255,.6); }
.social-icon a { background: rgba(255,255,255,.12); color: var(--white); }
.social-icon a:hover { background: var(--brass); }
.footer-bottom { background: #131C31; }
.footer-bottom-left a:hover { color: var(--brass); }

/* ---------- 10. Inner pages ---------- */
.breadcrumbs-area { position: relative; }
.breadcrumbs-area::before { content: ""; position: absolute; inset: 0; background: rgba(20,32,29,.7); }
.breadcrumbs-area > * { position: relative; }
.breadcrumbs > h2 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); color: var(--white); }
.breadcrumbs-list li, .breadcrumbs-list a { font-family: var(--font-ui); color: rgba(255,255,255,.9); }
.breadcrumbs-list a:hover { color: var(--brass); }

.about-title > h2 { font-family: var(--font-display); }
.about-title > h2::before { background: var(--brass); }

.address-single, .shop-widget, .modal-content, .panel.panel-default,
.check-out-area .panel.panel-default, .my-account-area .panel.panel-default {
  border-radius: var(--r-md);
  border-color: var(--rule);
  background: var(--white);
}
.address-single:hover { box-shadow: var(--shadow-pop); }
.icon i { color: var(--brass); }

/* forms */
input[type="text"], input[type="email"], input[type="password"],
input[type="number"], input[type="tel"], input[type="search"],
textarea, select,
.form-row > input, .create-account-form .form-row > input,
.contact-form-left > input, .input-message textarea, .order-notes textarea,
.shop-select select, .discount-middle > input {
  font-family: var(--font-ui);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  caret-color: var(--brass);
}
input:focus, textarea:focus, select:focus {
  border-color: var(--brass);
  outline: none;
  box-shadow: 0 0 0 3px var(--brass-a18);
}
.form-row > label, .shop-select > label, .order-notes > label {
  font-weight: 600;
  color: var(--ink);
  transition: color .2s ease;
}

/* shop sidebar */
.sidebar-title, .widget-title, .heading-title { font-family: var(--font-display); color: var(--ink); }
.sidebar-title::before, .heading-title::after { background: var(--brass); }
.sidebar-menu a { color: var(--ink-soft); }
.sidebar-menu a:hover { color: var(--brass); }
.tag-list a:hover { background: var(--brass); border-color: var(--brass); color: var(--white); }
.price-filter .ui-slider-range { background: var(--brass); }
.price-filter .ui-slider-handle.ui-state-default.ui-corner-all { background: var(--green); border-color: var(--green); }
.shop-pagination a:hover { color: var(--brass); }
.shop-tab-pill ul li.active i, .shop-tab-pill ul li a:hover i { color: var(--brass); }

/* single book page */
.single-product-details > h2 { font-family: var(--font-display); font-size: clamp(26px, 3vw, 36px); }
.single-product-price > h2 { font-family: var(--font-ui); font-weight: 600; color: var(--brass-dark); }
.new-price, .product-price { color: var(--brass-dark); font-weight: 600; font-variant-numeric: lining-nums tabular-nums; }
.availability > span { color: var(--green-2); font-weight: 600; }
.p-details-tab ul.p-details-nav-tab li a { font-family: var(--font-display); color: var(--ink-soft); }
.p-details-tab ul.p-details-nav-tab li.active a { color: var(--ink); }
.p-details-tab ul.p-details-nav-tab li.active a::before { background: var(--brass); }
.product-tabs li img, .single-product-image-inner .vbox-item > img { border-radius: 3px; box-shadow: var(--shadow-book); }
.social-share-icon a:hover { background: var(--brass); border-color: var(--brass); color: var(--white); }
#quantity-wanted-p input { border-color: var(--rule); border-radius: var(--r-sm); }

/* cart / wishlist / checkout tables */
.wishlist-right-area table, .shopping-cart-area table, #checkout-review-table {
  background: var(--white);
  border-radius: var(--r-md);
  overflow: hidden;
  font-variant-numeric: lining-nums tabular-nums;
}
.wishlist-right-area table th, .shopping-cart-area table th,
#checkout-review-table thead tr th, .data-table thead th {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--ink);
  background: var(--paper-2);
  border-color: var(--rule);
}
.t-product-name h3 a, .wishlist-table-area .t-product-name h3 a { font-family: var(--font-display); }
.product-remove > a:hover { color: var(--danger); }
.subtotal-area h2, .discount-top h3 { font-family: var(--font-display); }

/* quick view modal */
.modal-product .product-info h1 { font-family: var(--font-display); }
.modal-product .product-info .price-box .special-price { color: var(--brass-dark); }
.modal-product .product-images .main-image img { box-shadow: var(--shadow-book); }

/* scroll-to-top */
#scrollUp {
  background: var(--brass);
  border-radius: var(--r-sm);
  color: var(--white);
}
#scrollUp:hover { background: var(--brass-dark); }

/* ---------- 11. Responsive ---------- */
@media (max-width: 991px) {
  :root { --header-offset: 72px; }
  .section-padding { padding: 56px 0; }
  .testmonial-info { width: 92%; padding: 90px 8% 24px; }
  .layer-4 .title-4 input { width: 70%; }
}
@media (max-width: 767px) {
  body { font-size: 15px; }
  .section-padding { padding: 44px 0; }
  .section-title { padding-bottom: 14px; }
  .banner-title > p { padding: 0 10px; }
  .search-box input { width: 100%; margin-bottom: 12px; }
  .footer-top-area { padding-top: 32px; }
  .single-footer { padding-top: 28px; }
}


/* ==========================================================================
   13. SIGNATURE EFFECTS  (bookstore-specific CSS3)
   ========================================================================== */

/* --- 13.1 Paper grain: a faint fibre texture over the whole page --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: .05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .2  0 0 0 .9 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* --- 13.2 Reading-progress line (scroll-driven, ignored by old browsers) --- */
@supports (animation-timeline: scroll()) {
  body::after {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 3px;
    z-index: 9999;
    background: var(--brass);
    transform-origin: 0 50%;
    transform: scaleX(0);
    animation: readProgress linear both;
    animation-timeline: scroll(root);
  }
  @keyframes readProgress { to { transform: scaleX(1); } }
}

/* --- 13.3 THE signature moment: covers behave like physical books ---
   Hover OR keyboard focus pulls the book off the shelf. */
.single-banner-image-wrapper {
  position: relative;                 /* anchor for the spine/sheen layer */
  transform-origin: 0 50%;
  transform: perspective(900px) rotateY(0deg);
  transition:
    transform .7s var(--ease-out),
    box-shadow .7s var(--ease-out);
  border-radius: 2px 4px 4px 2px;
  box-shadow: 0 1px 2px rgba(20,25,30,.2), 0 10px 18px -8px rgba(20,25,30,.35);
  will-change: transform;
}
/* spine crease + light sheen; --sheen widens on hover so the light "moves" across the cover */
.single-banner-image-wrapper::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(90deg, rgba(0,0,0,.30) 0, rgba(255,255,255,.22) 3.5%, rgba(0,0,0,.10) 6%, transparent 11%),
    linear-gradient(115deg, rgba(255,255,255,.16) 0, transparent var(--sheen));
  transition: --sheen .7s var(--ease-out);
}
.single-banner:hover .single-banner-image-wrapper,
.single-banner:focus-within .single-banner-image-wrapper {
  transform: perspective(900px) rotateY(-17deg) translateX(-4px);
  box-shadow:
    1px 0 0 #f6f3ea, 2px 0 0 #cfc9b8, 3px 0 0 #f6f3ea, 4px 0 0 #cfc9b8, 5px 0 0 #f6f3ea,
    22px 18px 26px -10px rgba(20,25,30,.5);
}
.single-banner:hover .single-banner-image-wrapper::after,
.single-banner:focus-within .single-banner-image-wrapper::after { --sheen: 64%; }

/* --- 13.4 Price as a bookmark ribbon hanging from the card top --- */
.single-banner .price,
.featured-product-list .price,
.shop-single-product-area .price {
  top: 0;
  right: 16px;
  z-index: 3;
  padding: 12px 11px 22px;
  border-radius: 0;
  background: var(--brass);
  color: var(--white);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% calc(100% - 9px), 0 100%);
  transition: padding-bottom .35s ease, background-color .3s ease;
}
.single-banner:hover .price,
.single-banner:focus-within .price { padding-bottom: 32px; background: var(--brass-dark); }

/* --- 13.5 Turned page corner on cards --- */
.single-banner::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0;
  width: 0; height: 0;
  background: linear-gradient(315deg, var(--paper) 50%, #d5cfbc 50%, #f4f1e7 100%);
  box-shadow: -4px -4px 8px rgba(20,25,30,.14);
  border-top-left-radius: 6px;
  transition: width .35s ease, height .35s ease;
  z-index: 3;
  pointer-events: none;
}
.single-banner:hover::after,
.single-banner:focus-within::after { width: 30px; height: 30px; }

/* --- 13.7 Ink-draw underline on text links --- */
.blog-info a h2,
.footer-list li a,
.sidebar-menu a,
.breadcrumbs-list a,
.about-content a,
.t-product-name h3 a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1.5px no-repeat;
  padding-bottom: 2px;
  transition: background-size .45s var(--ease-out), color .25s ease;
}
.blog-info a h2:hover,
.footer-list li a:hover,
.sidebar-menu a:hover,
.breadcrumbs-list a:hover,
.about-content a:hover,
.t-product-name h3 a:hover { background-size: 100% 1.5px; }

/* --- 13.8 Buttons fill like ink soaking in (left to right) --- */
.layer-3 a.title-3,
.btn-search, .btn-default, .btn-primary, .cart-btn, .add-to-wishlist,
.quick-add-to-cart .single_add_to_cart_button,
.subtotal-main-area > a, .discount-middle > a,
.shopingcart-bottom-area a, .wishlist-bottom-link > a,
.product-cart-details > input[type="submit"],
.input-message .btn-default, .create-account-form .btn-default {
  background-color: var(--brass);
  background-image: linear-gradient(var(--green), var(--green));
  background-repeat: no-repeat;
  background-position: 0 50%;
  background-size: 0% 100%;
  transition: background-size .5s var(--ease-out), border-color .5s ease, color .3s ease, transform .12s ease;
}
.layer-3 a.title-3:hover,
.btn-search:hover, .btn-default:hover, .btn-primary:hover, .cart-btn:hover, .add-to-wishlist:hover,
.quick-add-to-cart .single_add_to_cart_button:hover,
.subtotal-main-area > a:hover, .discount-middle > a:hover,
.shopingcart-bottom-area a:hover, .wishlist-bottom-link > a:hover,
.product-cart-details > input[type="submit"]:hover,
.input-message .btn-default:hover, .create-account-form .btn-default:hover {
  background-color: var(--brass);
  background-image: linear-gradient(var(--green), var(--green));
  background-size: 100% 100%;
  border-color: var(--green);
  color: var(--white);
}
/* pressed + disabled states */
.layer-3 a.title-3:active, .btn-search:active, .btn-default:active, .btn-primary:active,
.cart-btn:active, .add-to-wishlist:active,
.quick-add-to-cart .single_add_to_cart_button:active { transform: translateY(1px); }
.btn-default[disabled], .btn-primary[disabled], .cart-btn[disabled],
.quick-add-to-cart .single_add_to_cart_button[disabled] {
  opacity: .55;
  cursor: not-allowed;
  background-size: 0% 100%;
}

/* --- 13.9 Hero: one orchestrated entrance. Title inks in, then sub-line and button follow --- */
.layer-1 h2.title-1 {
  animation: inkIn 1.3s cubic-bezier(.2,.7,.2,1) .4s backwards;
}
.layer-2 p.title-2 { animation: heroRise .9s var(--ease-out) 1.05s backwards; }
.layer-3 a.title-3 { animation: heroRise .9s var(--ease-out) 1.3s backwards; }
@keyframes inkIn {
  from { clip-path: inset(0 100% 0 0); filter: blur(6px); letter-spacing: .06em; opacity: .2; }
  to   { clip-path: inset(0 0 0 0);   filter: blur(0);   letter-spacing: -0.02em; opacity: 1; }
}
@keyframes heroRise {
  from { opacity: 0; translate: 0 14px; }
  to   { opacity: 1; translate: 0 0; }
}

/* --- 13.10 Drop cap on long-form reading text --- */
.about-content > p:first-child::first-letter,
.single-blog .blog-info > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 4.4em;
  line-height: .8;
  padding: 6px 12px 0 0;
  color: var(--brass);
}

/* --- 13.11 Testimonial card: printed-book quote mark --- */
.testmonial-info::before {
  content: "\201C";
  position: absolute;
  top: 26px; left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-display);
  font-size: 90px;
  line-height: 1;
  color: var(--brass);
  opacity: .35;
  pointer-events: none;
}

/* --- 13.12 Header cart badge pop (once, on load) --- */
.header-right ul li a span { animation: badgePop .6s cubic-bezier(.3,1.6,.5,1) 1s backwards; }
@keyframes badgePop { from { transform: scale(0); } to { transform: scale(1); } }


/* ==========================================================================
   14. ADVANCED LAYER  (progressive enhancement: every block is safe to ignore)
   ========================================================================== */

/* --- 14.1 Cross-page transitions: soft fade between pages (Chrome/Edge/Safari 18+) --- */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) { animation-duration: .35s; animation-timing-function: var(--ease-out); }

/* --- 14.2 Scroll-driven reveal for book cards (not inside carousels) ---
   Only the cards rise in; sections stay still, so the page doesn't feel over-animated. */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .single-banner:not(.owl-item .single-banner),
    .single-blog,
    .address-single {
      animation: cardRise linear both;
      animation-timeline: view();
      animation-range: entry 0% entry 40%;
    }
    @keyframes cardRise {
      from { opacity: 0; translate: 0 26px; }
      to   { opacity: 1; translate: 0 0; }
    }
  }
}

/* --- 14.3 Forms: label reacts to its field, real validation states --- */
.form-row:has(input:focus-visible, textarea:focus-visible, select:focus-visible) > label { color: var(--brass-dark); }
input:user-invalid, textarea:user-invalid, select:user-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(163,50,43,.15);
}
input::placeholder, textarea::placeholder { color: #8a9098; opacity: 1; }

/* --- 14.4 Cards with a rating or sale price get a subtle brass hairline --- */
.single-banner:has(.old-price) { box-shadow: inset 0 -3px 0 var(--brass), 0 1px 2px rgba(20,25,30,.08); }
.single-banner:has(.old-price):hover,
.single-banner:has(.old-price):focus-within { box-shadow: inset 0 -3px 0 var(--brass), var(--shadow-pop); }

/* --- 14.5 Images: fade in once loaded, avoid layout jank --- */
.single-banner-image-wrapper img,
.product-image img { background: var(--paper-2); }
img { max-width: 100%; height: auto; }

/* --- 14.6 Custom scrollbar (WebKit fallback for the standard properties above) --- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper-2); }
::-webkit-scrollbar-thumb { background: var(--brass); border-radius: 10px; border: 2px solid var(--paper-2); }
::-webkit-scrollbar-thumb:hover { background: var(--brass-dark); }

/* --- 14.7 Text-selection and long-word safety --- */
.banner-bottom, .blog-info, .testmonial-info { overflow-wrap: anywhere; }


/* ==========================================================================
   15. ACCESSIBILITY, INPUT MODES, PRINT
   ========================================================================== */

/* --- 15.1 Reduced motion: everything above switches off cleanly --- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .single-banner:hover .single-banner-image-wrapper,
  .single-banner:focus-within .single-banner-image-wrapper { transform: none; }
  body::after { animation: none; transform: scaleX(0); }
  .layer-1 h2.title-1, .layer-2 p.title-2, .layer-3 a.title-3,
  .header-right ul li a span { animation: none; }
  @view-transition { navigation: none; }
}

/* --- 15.2 Touch devices: no sticky-hover tilt --- */
@media (hover: none) {
  .single-banner:hover .single-banner-image-wrapper { transform: none; }
}

/* --- 15.3 Higher contrast on request --- */
@media (prefers-contrast: more) {
  :root { --ink-soft: #2b3036; --rule: #8d887b; --brass: #7d5716; --brass-dark: #5f420f; }
  .single-banner::after, body::before { display: none; }
}

/* --- 15.4 Windows High Contrast: shapes built from clip-path/gradients need real borders --- */
@media (forced-colors: active) {
  .single-banner .price { clip-path: none; border: 1px solid CanvasText; }
  .layer-3 a.title-3, .btn-default, .btn-primary, .cart-btn { border: 1px solid ButtonText; }
  body::before, body::after { display: none; }
}

/* --- 15.5 Print: clean reading copy --- */
@media print {
  body::before, body::after,
  .header-area, .footer-top-area, .footer-bottom, #scrollUp,
  .functional-buttons, .layer-4 { display: none !important; }
  body { font-size: 12pt; color: #000; }
  p { color: #000; }
  .single-banner { box-shadow: none; break-inside: avoid; }
  .single-banner::after { display: none; }
  .about-content a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .85em; color: #555; }
}