/* ==========================================================================
   IWA Book Store — Floating Icon & Compact Dark-Theme Slide-Out Drawer
   Brand Palette: #1E88F9 | #FFD400 | #000000 | #FFFFFF | #25D366
   ========================================================================== */

/* ---------- Floating Action Button (Left of Vertical Blue Branding Strip) ---------- */
:root {
  --iwa-fab-size: 56px;
  --iwa-fab-right: 22px;
}

.iwa-fab-wrap {
  position: fixed;
  right: calc(var(--strip-width, 120px) + var(--iwa-fab-right));
  /* Vertically center the circular button precisely on the horizontal blue footer divider */
  bottom: calc(clamp(1.25rem, 2.5vh, 1.85rem) + 1.15rem + 40px - (var(--iwa-fab-size) / 2));
  z-index: 900;
}

/* Connect the horizontal blue footer divider cleanly to the 9 o'clock outer edge of the button */
.site-footer {
  position: relative;
  border-top: none;
  padding-right: max(
    0px,
    calc(
      var(--iwa-fab-size) + var(--iwa-fab-right) + 14px -
      max(
        clamp(1.5rem, 4.5vw, 4.25rem),
        (100vw - var(--strip-width, 120px) - 1260px) / 2
      )
    )
  );
}

.site-footer::before {
  content: '';
  position: absolute;
  top: -0.5px;
  left: 0;
  right: calc(
    var(--iwa-fab-size) + var(--iwa-fab-right) -
    max(
      clamp(1.5rem, 4.5vw, 4.25rem),
      (100vw - var(--strip-width, 120px) - 1260px) / 2
    )
  );
  height: 1px;
  background: rgba(30, 136, 249, 0.55);
  pointer-events: none;
}

.iwa-fab {
  position: relative;
  width: var(--iwa-fab-size);
  height: var(--iwa-fab-size);
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  background-color: #1E88F9;
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow:
    0 10px 28px rgba(30, 136, 249, 0.45),
    0 0 0 4px rgba(30, 136, 249, 0.16);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              background-color 200ms ease,
              box-shadow 220ms ease;
}

.iwa-fab:hover {
  transform: translateY(-3px) scale(1.05);
  background-color: #2E94FF;
  box-shadow:
    0 14px 34px rgba(30, 136, 249, 0.62),
    0 0 0 6px rgba(30, 136, 249, 0.22);
}

.iwa-fab:active {
  transform: translateY(-1px) scale(0.98);
}

.iwa-fab:focus-visible {
  outline: 2px solid #FFD400;
  outline-offset: 4px;
}

/* Cart Item Count Badge */
.iwa-fab__badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  background-color: #FFD400;
  color: #000000;
  font-family: var(--font-en, 'Poppins', sans-serif);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.45);
}

/* Hover Tooltip */
.iwa-fab__tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  padding: 0.42rem 0.78rem;
  border-radius: 8px;
  background: #0A1324;
  border: 1px solid rgba(30, 136, 249, 0.55);
  color: #FFFFFF;
  font-family: var(--font-en, 'Poppins', sans-serif);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transition: opacity 180ms ease, transform 180ms ease;
}

.iwa-fab:hover .iwa-fab__tooltip,
.iwa-fab:focus-visible .iwa-fab__tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

/* ---------- Drawer Backdrop ---------- */
.iwa-store-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 240ms ease;
}

.iwa-store-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}

/* ---------- Slide-Out Drawer Panel (Hidden by Default) ---------- */
.iwa-store-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(620px, 94vw);
  height: 100vh;
  height: 100dvh;
  z-index: 1150;
  background: linear-gradient(180deg, #071020 0%, #030710 100%);
  border-left: 1.5px solid rgba(30, 136, 249, 0.42);
  box-shadow: -16px 0 54px rgba(0, 0, 0, 0.85);
  color: #FFFFFF;
  font-family: var(--font-en, 'Poppins', sans-serif);
  display: flex;
  flex-direction: column;
  transform: translateX(104%);
  visibility: hidden;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), visibility 280ms ease;
}

.iwa-store-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
}

/* Header */
.iwa-store__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.35rem 1rem;
  border-bottom: 1px solid rgba(30, 136, 249, 0.26);
}

.iwa-store__title {
  font-size: 1.25rem;
  font-weight: 800;
  color: #FFFFFF;
  line-height: 1.2;
}

.iwa-store__subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.2rem;
}

.iwa-store__close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(30, 136, 249, 0.4);
  background: rgba(255, 255, 255, 0.04);
  color: #FFFFFF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 180ms ease, border-color 180ms ease;
}

.iwa-store__close:hover {
  background: rgba(30, 136, 249, 0.24);
  border-color: #1E88F9;
}

/* Internal View Tabs */
.iwa-store__tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.35);
}

.iwa-store__tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  padding: 0.5rem 0.6rem;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(255, 255, 255, 0.7);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 180ms ease;
}

.iwa-store__tab:hover {
  color: #FFFFFF;
  background: rgba(30, 136, 249, 0.12);
}

.iwa-store__tab.is-active {
  background: #1E88F9;
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(30, 136, 249, 0.35);
}

/* Inline Feedback Toast */
.iwa-store__toast {
  margin: 0.75rem 1.35rem 0;
  padding: 0.58rem 0.85rem;
  border-radius: 9px;
  background: rgba(30, 136, 249, 0.16);
  border: 1px solid rgba(30, 136, 249, 0.5);
  color: #FFD400;
  font-size: 0.78rem;
  font-weight: 600;
}

/* Scrollable Drawer Body */
.iwa-store__body {
  flex: 1;
  overflow-y: auto;
  padding: 1.1rem 1.35rem 1.35rem;
}

/* ---------- Product Cards (Vertical Full-Cover Bookstore Layout) ---------- */
.iwa-book-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}

.iwa-book-item {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.95rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #0A1730 0%, #050C1B 100%);
  border: 1px solid rgba(30, 136, 249, 0.34);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.45);
  transition: transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
              border-color 220ms ease,
              box-shadow 220ms ease,
              background-color 220ms ease;
}

.iwa-book-item:hover {
  transform: translateY(-3px);
  border-color: rgba(30, 136, 249, 0.78);
  box-shadow:
    0 16px 34px rgba(0, 0, 0, 0.62),
    0 0 0 1px rgba(30, 136, 249, 0.24);
}

/* Portrait 3:4 Cover Showcase Stage */
.iwa-book-item__media {
  width: 100%;
  aspect-ratio: 3 / 4;
  padding: 0.65rem;
  border-radius: 12px;
  background: radial-gradient(circle at 50% 42%, rgba(30, 136, 249, 0.16) 0%, #040A16 78%);
  border: 1px solid rgba(30, 136, 249, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Portrait Book Cover Frame (Shows 100% of Front Cover Without Cropping) */
.iwa-book-cover {
  position: relative;
  height: 100%;
  aspect-ratio: 1 / 1.414;
  max-width: 100%;
  flex: 0 0 auto;
  border-radius: 7px;
  overflow: hidden;
  background: #060C18;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
  transition: transform 240ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.iwa-book-item:hover .iwa-book-cover {
  transform: translateY(-2px) scale(1.015);
}

.iwa-book-item__img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

/* Original g10book.jpg / g11book.jpg are 2-page print spreads (back left, full front right) */
.iwa-book-cover--spread .iwa-book-item__img {
  position: absolute;
  top: 0;
  right: 0;
  width: 200.4%;
  max-width: none;
  height: 100%;
  object-fit: contain;
  object-position: right center;
}

.iwa-book-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 7px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem;
  background: rgba(30, 136, 249, 0.14);
  color: #FFFFFF;
  font-size: 0.84rem;
  font-weight: 700;
}

.iwa-book-placeholder small {
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
  margin-top: 0.25rem;
}

.iwa-book-item__content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  padding-top: 0.9rem;
}

.iwa-book-item__badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.iwa-pill {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.54rem;
  border-radius: 6px;
}

.iwa-pill--blue {
  background: rgba(30, 136, 249, 0.22);
  color: #6CB4FF;
  border: 1px solid rgba(30, 136, 249, 0.45);
}

.iwa-pill--dark {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.iwa-pill--yellow {
  background: rgba(255, 212, 0, 0.16);
  color: #FFD400;
}

.iwa-book-item__name {
  margin-top: 0.55rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.3;
}

.iwa-book-item__meta {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 0.25rem;
}

.iwa-book-item__price {
  margin-top: 0.55rem;
  font-size: 1.12rem;
  font-weight: 800;
  color: #FFD400;
  letter-spacing: 0.01em;
}

.iwa-book-item__price.is-unpriced {
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
}

.iwa-book-item__actions {
  margin-top: auto;
  padding-top: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.iwa-qty--card {
  width: 100%;
  justify-content: space-between;
}

.iwa-qty--card .iwa-qty__btn {
  width: 36px;
  height: 34px;
}

.iwa-qty--card .iwa-qty__val {
  flex: 1;
}

.iwa-book-item__add {
  width: 100%;
  padding: 0.62rem 1rem;
  font-size: 0.82rem;
}

.iwa-book-item__details {
  align-self: center;
  margin-top: 0.1rem;
}

/* Quantity Selector */
.iwa-qty {
  display: inline-flex;
  align-items: center;
  border-radius: 8px;
  border: 1px solid rgba(30, 136, 249, 0.45);
  background: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

.iwa-qty__btn {
  width: 28px;
  height: 30px;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 160ms ease;
}

.iwa-qty__btn:hover:not(:disabled) {
  background: rgba(30, 136, 249, 0.28);
}

.iwa-qty__btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.iwa-qty__val {
  min-width: 26px;
  text-align: center;
  font-size: 0.82rem;
  font-weight: 700;
  color: #FFFFFF;
}

/* Buttons */
.iwa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.52rem 0.95rem;
  border-radius: 9px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.iwa-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.iwa-btn--blue {
  background: #1E88F9;
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(30, 136, 249, 0.3);
}

.iwa-btn--blue:hover:not(:disabled) {
  background: #3395FF;
  transform: translateY(-1px);
}

.iwa-btn--whatsapp {
  background: #25D366;
  color: #000000;
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
}

.iwa-btn--whatsapp:hover:not(:disabled) {
  background: #2EE171;
  transform: translateY(-1px);
}

.iwa-btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
  color: #FFFFFF;
}

.iwa-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.iwa-btn--block {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 0.86rem;
}

.iwa-link-btn,
.iwa-back-btn {
  align-self: flex-start;
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  color: #6CB4FF;
  font-family: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.iwa-link-btn:hover,
.iwa-back-btn:hover {
  color: #FFD400;
  text-decoration: underline;
}

.iwa-back-btn {
  margin-top: 0;
  margin-bottom: 0.85rem;
  font-size: 0.8rem;
}

/* ---------- Book Details View ---------- */
.iwa-book-detail__media {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(30, 136, 249, 0.45);
  background: #060C18;
}

.iwa-book-detail__img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}

.iwa-book-detail__title {
  margin-top: 0.55rem;
  font-size: 1.15rem;
  font-weight: 800;
  color: #FFFFFF;
}

.iwa-book-detail__tamil {
  margin-top: 0.6rem;
  font-family: var(--font-ta, 'Noto Sans Tamil', sans-serif);
  font-size: 0.82rem;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.88);
}

.iwa-book-detail__desc {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.72);
}

.iwa-book-detail__features {
  margin-top: 0.85rem;
  padding-left: 1.1rem;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.82);
}

.iwa-book-detail__actions {
  margin-top: 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
}

/* ---------- Cart & Checkout Views ---------- */
.iwa-empty {
  text-align: center;
  padding: 2.25rem 1rem;
  border-radius: 14px;
  border: 1px dashed rgba(30, 136, 249, 0.4);
  background: rgba(30, 136, 249, 0.04);
}

.iwa-empty__icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 0.75rem;
  border-radius: 12px;
  background: rgba(30, 136, 249, 0.16);
  color: #1E88F9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iwa-empty__title {
  font-size: 1rem;
  font-weight: 700;
}

.iwa-empty__desc {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.68);
  margin: 0.35rem auto 1rem;
  max-width: 280px;
}

.iwa-cart-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.iwa-cart-row {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
  padding: 0.75rem;
  border-radius: 12px;
  background: rgba(30, 136, 249, 0.06);
  border: 1px solid rgba(30, 136, 249, 0.3);
}

.iwa-cart-row__thumb {
  width: 56px;
  aspect-ratio: 1 / 1.414;
  border-radius: 7px;
  overflow: hidden;
  background: #060C18;
  display: flex;
  align-items: center;
  justify-content: center;
}

.iwa-cart-row__thumb .iwa-book-cover {
  width: 100%;
  height: 100%;
  border-radius: 0;
  box-shadow: none;
}

.iwa-cart-row__name {
  font-size: 0.86rem;
  font-weight: 700;
  color: #FFFFFF;
}

.iwa-cart-row__unit {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.62);
  margin-top: 0.1rem;
}

.iwa-cart-row__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.iwa-cart-row__sub {
  font-size: 0.86rem;
  font-weight: 800;
  color: #FFD400;
}

.iwa-icon-del {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.iwa-icon-del:hover {
  color: #FF5C5C;
  border-color: rgba(255, 92, 92, 0.5);
  background: rgba(255, 92, 92, 0.1);
}

.iwa-summary-box {
  margin-top: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 12px;
  background: rgba(30, 136, 249, 0.1);
  border: 1px solid rgba(30, 136, 249, 0.36);
}

.iwa-summary-title {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6CB4FF;
  margin-bottom: 0.55rem;
}

.iwa-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.82);
}

.iwa-summary-row--total {
  margin-top: 0.45rem;
  font-size: 1rem;
  font-weight: 800;
  color: #FFD400;
}

.iwa-checkout-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.6rem;
  font-size: 0.8rem;
  padding: 0.3rem 0;
}

.iwa-checkout-line strong {
  display: block;
  color: #FFFFFF;
}

.iwa-checkout-line small {
  color: rgba(255, 255, 255, 0.65);
  font-size: 0.72rem;
}

.iwa-checkout-line span {
  font-weight: 700;
  color: #FFD400;
  white-space: nowrap;
}

/* Order Form */
.iwa-order-form {
  margin-top: 1.05rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.iwa-field {
  display: flex;
  flex-direction: column;
  gap: 0.32rem;
}

.iwa-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
}

.iwa-req {
  color: #FFD400;
}

.iwa-field input,
.iwa-field textarea {
  width: 100%;
  padding: 0.65rem 0.82rem;
  border-radius: 10px;
  border: 1.5px solid rgba(30, 136, 249, 0.38);
  background: rgba(0, 0, 0, 0.55);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 0.84rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.iwa-field input:focus,
.iwa-field textarea:focus {
  outline: none;
  border-color: #1E88F9;
  box-shadow: 0 0 0 3px rgba(30, 136, 249, 0.22);
}

.iwa-field input.is-invalid,
.iwa-field textarea.is-invalid {
  border-color: #FF5C5C;
}

.iwa-field-err {
  font-size: 0.72rem;
  color: #FF8585;
}

.iwa-order-note {
  font-size: 0.73rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.66);
}

.iwa-wa-ready {
  margin-bottom: 0.9rem;
  padding: 0.8rem 0.9rem;
  border-radius: 10px;
  background: rgba(37, 211, 102, 0.14);
  border: 1px solid rgba(37, 211, 102, 0.5);
  font-size: 0.78rem;
  color: #FFFFFF;
}

.iwa-wa-ready strong {
  color: #25D366;
  display: block;
  margin-bottom: 0.2rem;
}

.iwa-wa-ready a {
  color: #FFD400;
  font-weight: 700;
  text-decoration: underline;
}

/* Sticky Drawer Footer */
.iwa-store__footer {
  padding: 0.9rem 1.35rem 1.1rem;
  border-top: 1px solid rgba(30, 136, 249, 0.28);
  background: rgba(0, 0, 0, 0.55);
}

.iwa-footer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.iwa-footer-bar__hint {
  font-size: 0.74rem;
  color: rgba(255, 255, 255, 0.65);
}

.iwa-footer-bar__total {
  font-size: 1.02rem;
  font-weight: 800;
  color: #FFD400;
}

/* ---------- Responsive (Tablet & Mobile Bottom-Sheet) ---------- */
@media (max-width: 1040px) {
  :root {
    --iwa-fab-right: 16px;
  }
}

@media (max-width: 768px) {
  :root {
    --iwa-fab-size: 52px;
    --iwa-fab-right: 16px;
  }

  .page-shell {
    padding-bottom: calc(4.75rem + env(safe-area-inset-bottom, 0px));
  }

  .iwa-fab-wrap {
    position: fixed;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    z-index: 900;
  }

  .site-footer {
    padding-right: 0;
  }

  .site-footer::before {
    right: 0;
  }

  .iwa-fab__tooltip {
    display: none;
  }
}

@media (max-width: 660px) {
  .iwa-book-list {
    grid-template-columns: 1fr;
    gap: 1.1rem;
  }

  .iwa-book-item {
    padding: 1.05rem;
  }

  .iwa-book-item__media {
    max-width: 280px;
    margin: 0 auto;
  }
}

@media (max-width: 600px) {
  .iwa-store-drawer {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 88dvh;
    border-left: 0;
    border-top: 1.5px solid rgba(30, 136, 249, 0.5);
    border-radius: 20px 20px 0 0;
    transform: translateY(104%);
  }

  .iwa-store-drawer.is-open {
    transform: translateY(0);
  }

  .iwa-store__body {
    padding: 1rem 1.05rem 1.25rem;
  }

  .iwa-book-item__media {
    max-width: 250px;
  }
}

/* ---------- Keyboard Focus & Reduced Motion Accessibility ---------- */
.iwa-store__close:focus-visible,
.iwa-store__tab:focus-visible,
.iwa-btn:focus-visible,
.iwa-qty__btn:focus-visible,
.iwa-icon-del:focus-visible,
.iwa-link-btn:focus-visible,
.iwa-back-btn:focus-visible {
  outline: 2px solid #FFD400;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .iwa-fab,
  .iwa-fab__tooltip,
  .iwa-store-backdrop,
  .iwa-store-drawer,
  .iwa-btn,
  .iwa-book-item,
  .iwa-book-cover {
    transition: none;
  }
}
