/* assets/css/responsive.css - Responsiveness layouts and Media Queries */

:root {
  --accent-orange: var(--warm-orange);
}

/* Tablet & Smaller Screens (1024px and down) */
@media screen and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  
  .hero-content {
    align-items: center;
  }
  
  .hero-tagline {
    justify-content: center;
  }
  
  .hero-tagline::after {
    display: none;
  }
  
  .hero-books-podium {
    margin: 0 auto;
    width: 380px;
    height: 330px;
  }
  
  .hero-visual {
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
    padding: 10px 0 !important;
  }
  
  .podium-book-1 {
    transform: rotateY(-20deg) rotateX(10deg) translateZ(-40px) translateX(-70px);
  }
  
  .podium-book-2 {
    width: 130px;
    height: 190px;
  }
  
  .podium-book-3 {
    transform: rotateY(20deg) rotateX(10deg) translateZ(-40px) translateX(70px);
  }
  
  .books-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 30px;
  }
  
  .about-prakashani-grid {
    grid-template-columns: 1fr;
    gap: 30px;
    text-align: center;
  }
  
  .about-prakashani-visual {
    order: -1;
  }
  
  .about-prakashani-content {
    align-items: center;
  }
  
  .benefits-grid {
    justify-content: center;
  }
}

/* Mobile Devices (768px and down) */
@media screen and (max-width: 768px) {
  .main-header .container {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
  }
  
  .logo-container {
    justify-content: center;
  }
  
  .header-actions {
    justify-content: space-around;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
  }
  
  .mobile-nav-toggle {
    display: block;
  }
  
  /* Slide-in Mobile Drawer Navigation */
  .nav-bar .container {
    padding: 5px 15px;
  }
  
  .nav-links {
    position: fixed;
    top: 0;
    left: -280px;
    width: 280px;
    height: 100vh;
    background-color: var(--deep-navy);
    flex-direction: column;
    align-items: flex-start;
    padding: 60px 20px 20px;
    transition: var(--transition);
    z-index: 1001;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  
  .nav-links > li > a {
    padding: 12px 10px;
    width: 100%;
  }
  
  /* Dropdown styles in mobile */
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background-color: rgba(255, 255, 255, 0.03);
    box-shadow: none;
    border: none;
    width: 100%;
    padding: 5px 0 5px 15px;
    display: none; /* Toggle via JS */
  }
  
  .nav-links > li.dropdown-active .nav-dropdown {
    display: block;
  }
  
  .nav-links > li > a::after {
    content: '\eb73'; /* remixicon arrow down */
    font-family: 'remixicon';
    margin-left: auto;
    font-size: 14px;
  }
  
  /* Overlay */
  .nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    backdrop-filter: blur(3px);
  }
  
  .nav-overlay.active {
    display: block;
  }
  
  .books-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .promo-banner-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 30px;
  }
  
  .promo-badge {
    align-self: center;
  }
  
  .promo-visual {
    justify-content: center;
  }
  
  .newsletter-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .newsletter-title-wrapper {
    flex-direction: column;
  }
}

/* Very Small Mobile Devices (480px and down) */
@media screen and (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }
  
  .hero-btns {
    flex-direction: column !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 15px !important;
  }
  
  .hero-btns .btn {
    width: 100% !important;
    box-sizing: border-box !important;
    text-align: center !important;
  }
  
  .hero-books-podium {
    width: 200px;
    height: 180px;
    margin: 0 auto;
  }
  
  .podium-book {
    width: 70px;
    height: 100px;
  }
  
  .podium-book-1 {
    transform: rotateY(-20deg) rotateX(10deg) translateZ(-20px) translateX(-35px);
  }
  
  .podium-book-2 {
    width: 80px;
    height: 115px;
  }
  
  .podium-book-3 {
    transform: rotateY(20deg) rotateX(10deg) translateZ(-20px) translateX(35px);
  }
  
  .books-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  
  .book-card {
    padding: 10px;
  }
  
  .book-title-bg {
    font-size: 13px;
  }
  
  .price-selling {
    font-size: 14px;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 25px;
  }
  
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* Scroll reveal CSS overrides */
.reveal {
  opacity: 0;
  transform: translateY(25px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  
  .glow-bubble, 
  .floating-feather {
    animation: none !important;
    display: none !important;
  }
  
  .book-cover,
  .category-card,
  .author-card,
  .collection-card {
    transition: none !important;
  }
  
  .book-card:hover,
  .category-card:hover,
  .author-card:hover,
  .collection-card:hover {
    transform: none !important;
  }
}

/* ---------------------------------------------------- */
/* MOBILE SHOPPING EXPERIENCE & APP PORTING OVERRIDES   */
/* ---------------------------------------------------- */

/* Desktop overrides to hide all mobile-only widgets */
.mobile-header,
.mobile-bottom-nav,
.mobile-drawer,
.drawer-overlay,
.mobile-search-overlay,
.mobile-catalog-controls {
  display: none;
}

/* Tablet & Mobile Layout Enhancements */
@media screen and (max-width: 768px) {
  /* Global viewport clipping prevention */
  html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* Layout adjustments and spacing */
  body {
    padding-bottom: 84px !important; /* Provide space for the bottom nav bar */
  }
  
  /* Hide desktop header / navbar */
  .main-header,
  .nav-bar {
    display: none !important;
  }
  
  /* Mobile announcement bar adjustments */
  .announcement-bar {
    padding: 8px 12px !important;
    overflow: hidden !important;
  }
  .announcement-bar .container {
    max-width: 100% !important;
    overflow: hidden !important;
  }
  .announcement-text {
    font-size: 11px !important;
    text-align: center !important;
    display: block !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    width: 100% !important;
  }
  .announcement-text span {
    display: inline !important;
    white-space: nowrap !important;
  }
  .announcement-text span:nth-child(2),
  .view-offers-btn {
    display: none !important;
  }
  
  /* Mobile header style */
  .mobile-header {
    display: block;
    position: sticky;
    top: 0;
    z-index: 999;
    height: 58px;
    background: rgba(255, 252, 247, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(36, 84, 166, 0.08);
    box-shadow: 0 2px 10px rgba(22, 47, 92, 0.04);
  }
  .mobile-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
    padding: 0 16px;
  }
  .mobile-nav-trigger {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--deep-navy);
    cursor: pointer;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-logo-container {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
  }
  .mobile-logo-img {
    height: 32px;
    width: 32px;
    object-fit: contain;
    border-radius: 50%;
  }
  .mobile-brand-name {
    font-family: 'Hind Siliguri', 'Galada', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-blue);
  }
  .mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .mobile-header-action {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--deep-navy);
    cursor: pointer;
    position: relative;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
  }
  .mobile-header-action .badge-counter {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent-orange);
    color: #fff;
    font-size: 10px;
    font-weight: bold;
    border-radius: 50%;
    min-width: 15px;
    height: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #fff;
  }

  /* Mobile Sticky Bottom Navigation */
  .mobile-bottom-nav {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 64px;
    background: rgba(255, 252, 247, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(36, 84, 166, 0.08);
    box-shadow: 0 -8px 25px rgba(22, 47, 92, 0.06);
    z-index: 998;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
  }
  .bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #7a8293;
    flex: 1;
    height: 100%;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    transition: color 0.2s ease;
    position: relative;
  }
  .bottom-nav-item i {
    font-size: 20px;
    transition: transform 0.2s ease;
    color: var(--deep-navy);
  }
  .bottom-nav-item.active {
    color: var(--primary-blue);
    font-weight: 700;
  }
  .bottom-nav-item.active i {
    color: var(--accent-orange);
    transform: translateY(-2px);
  }
  .bottom-nav-icon-wrapper {
    position: relative;
    display: inline-block;
  }
  .bottom-nav-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background: var(--accent-orange);
    color: white;
    font-size: 9px;
    border-radius: 50%;
    min-width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid white;
    font-weight: bold;
  }

  /* Raised circular search button */
  #bottomNavSearchTrigger {
    position: relative;
    z-index: 10;
  }
  #bottomNavSearchTrigger i {
    background: linear-gradient(135deg, var(--accent-orange), #ff4d4d);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -24px;
    box-shadow: 0 4px 12px rgba(242, 138, 36, 0.4);
    font-size: 22px;
  }
  #bottomNavSearchTrigger.active i {
    background: linear-gradient(135deg, var(--primary-blue), #162f5c);
    box-shadow: 0 4px 12px rgba(22, 47, 92, 0.4);
  }

  /* Slide-in Mobile Navigation Drawer */
  .mobile-drawer {
    display: flex;
    position: fixed;
    top: 0;
    left: -290px;
    width: 280px;
    height: 100vh;
    background: #fffcf7;
    z-index: 1001;
    transition: left 0.3s ease-in-out;
    box-shadow: 5px 0 25px rgba(0, 0, 0, 0.12);
    flex-direction: column;
    overflow: hidden;
  }
  .mobile-drawer.active {
    left: 0;
  }
  .mobile-drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid rgba(36, 84, 166, 0.08);
    background: #fbf6ee;
  }
  .drawer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: var(--primary-blue);
    font-family: 'Hind Siliguri', 'Galada', sans-serif;
    font-weight: 700;
    font-size: 18px;
  }
  .drawer-logo img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
  }
  .mobile-drawer-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--deep-navy);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-drawer-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
  }
  .drawer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }
  .drawer-nav li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: var(--deep-navy);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    transition: background 0.2s ease;
  }
  .drawer-nav li a i {
    font-size: 18px;
    color: var(--primary-blue);
  }
  .drawer-nav li a:active {
    background: rgba(242, 138, 36, 0.08);
  }
  .drawer-accordion .accordion-toggle {
    justify-content: space-between;
  }
  .drawer-accordion .accordion-toggle::after {
    display: none !important; /* Hide original arrow down symbol */
  }
  .drawer-accordion .accordion-toggle i:last-child {
    transition: transform 0.2s ease;
  }
  .drawer-accordion.active .accordion-toggle i:last-child {
    transform: rotate(180deg);
  }
  .accordion-content {
    list-style: none;
    padding: 2px 0 2px 20px;
    display: none;
    background: rgba(36, 84, 166, 0.02);
    border-radius: 6px;
    margin: 2px 0;
  }
  .drawer-accordion.active .accordion-content {
    display: block;
  }
  .accordion-content li a {
    padding: 8px 12px;
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
  }
  .mobile-drawer-footer {
    padding: 12px;
    border-top: 1px solid rgba(36, 84, 166, 0.08);
    background: #fbf6ee;
    display: flex;
    gap: 8px;
  }
  .drawer-auth-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    background: var(--primary-blue);
    color: #fff;
  }
  .drawer-auth-btn.signup {
    background: var(--accent-orange);
  }
  .drawer-auth-btn.logout {
    background: #e74c3c;
  }
  .drawer-overlay {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
  }
  .drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* Full Screen Search Overlay */
  .mobile-search-overlay {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fffcf7;
    z-index: 1002;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-15px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    flex-direction: column;
  }
  .mobile-search-overlay.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
  }
  .mobile-search-header {
    display: flex;
    align-items: center;
    padding: 8px 16px;
    border-bottom: 1px solid rgba(36, 84, 166, 0.08);
    background: #fbf6ee;
    gap: 12px;
    height: 56px;
  }
  .mobile-search-close {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--deep-navy);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-search-input-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
  }
  .mobile-search-input-wrapper .search-icon {
    position: absolute;
    left: 12px;
    font-size: 16px;
    color: #888;
  }
  .mobile-search-input-wrapper input {
    width: 100%;
    height: 38px;
    background: #fff;
    border: 1px solid rgba(36, 84, 166, 0.12);
    border-radius: 19px;
    padding: 0 36px;
    font-size: 14px;
    color: var(--deep-navy);
    outline: none;
  }
  .mobile-search-clear {
    position: absolute;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: #aaa;
    cursor: pointer;
  }
  .mobile-search-results {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: #fffcf7;
  }
  .mobile-search-result-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid rgba(36, 84, 166, 0.04);
    text-decoration: none;
    color: var(--deep-navy);
  }
  .result-cover {
    width: 38px;
    height: 54px;
    object-fit: cover;
    border-radius: 4px;
  }
  .result-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .result-title {
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
  }
  .result-author {
    font-size: 11px;
    color: #666;
  }
  .result-price {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-orange);
  }

  /* Catalog Page Responsive Layout */
  .catalog-layout {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  
  /* Mobile Sidebar Drawer Filters */
  .sidebar-filters {
    position: fixed !important;
    top: 0;
    right: -290px;
    width: 280px;
    height: 100vh;
    background: #fff !important;
    z-index: 1001;
    transition: right 0.3s ease-in-out;
    box-shadow: -5px 0 25px rgba(0,0,0,0.15) !important;
    display: block !important;
    padding: 20px !important;
    overflow-y: auto !important;
    border: none !important;
    border-radius: 0 !important;
  }
  .sidebar-filters.active {
    right: 0 !important;
  }
  .sidebar-filters h3 {
    margin-top: 0;
    font-size: 18px;
  }
  
  /* Controls top bar styles override */
  .desktop-catalog-controls {
    display: none !important;
  }
  .mobile-catalog-controls {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
  }
  .mobile-filter-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(36, 84, 166, 0.15);
    background: #fff;
    color: var(--deep-navy);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
  }
  .mobile-sort-select-wrapper {
    flex: 1;
    position: relative;
  }
  .mobile-sort-select-wrapper select {
    width: 100%;
    height: 40px;
    border-radius: 20px;
    border: 1px solid rgba(36, 84, 166, 0.15);
    background: #fff;
    color: var(--deep-navy);
    font-weight: 700;
    font-size: 13px;
    padding: 0 15px;
    outline: none;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    text-align: center;
  }
  .mobile-sort-select-wrapper::after {
    content: "\ea4c"; /* remixicon arrow down */
    font-family: 'remixicon';
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    font-size: 12px;
    color: var(--deep-navy);
  }

  /* Grid layout force to 2 columns */
  .books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
  }

  /* Product details mobile visual layout */
  .detail-layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px !important;
  }
  .detail-image-panel,
  .detail-info-panel {
    display: contents !important;
  }
  .detail-image-panel > div:first-child {
    order: 1 !important;
    margin-bottom: 8px !important;
    padding: 20px !important;
  }
  .detail-info-panel > h1 {
    order: 2 !important;
    font-size: 22px !important;
    margin-bottom: 4px !important;
    text-align: left !important;
  }
  .detail-info-panel > h2 {
    order: 2 !important;
    font-size: 14px !important;
    margin-bottom: 8px !important;
    text-align: left !important;
  }
  .detail-info-panel > p {
    order: 2 !important;
    font-size: 13px !important;
    margin-bottom: 12px !important;
  }
  .detail-info-panel > div:first-of-type {
    order: 3 !important;
    margin-bottom: 15px !important;
    padding: 12px 20px !important;
    justify-content: flex-start !important;
    border-radius: 8px !important;
  }
  .detail-info-panel > div:first-of-type span:first-child {
    font-size: 22px !important;
  }
  .detail-image-panel > div:last-child {
    order: 4 !important;
    margin-bottom: 20px !important;
    padding: 15px !important;
    border-radius: 8px !important;
  }
  .detail-image-panel > div:last-child button {
    padding: 12px !important;
    font-size: 13px !important;
  }
  .detail-info-panel > h3,
  .detail-info-panel > table {
    order: 5 !important;
    margin-bottom: 15px !important;
  }
  .detail-info-panel > div:last-of-type,
  .detail-info-panel > div.description-box {
    order: 6 !important;
  }

  /* Cart Layout Adjustments */
  .cart-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .cart-layout table,
  .cart-layout thead,
  .cart-layout tbody,
  .cart-layout th,
  .cart-layout tr,
  .cart-layout td {
    display: block !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  .cart-layout thead {
    display: none !important;
  }
  .cart-layout tr {
    background: #fff !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    margin-bottom: 12px !important;
    padding: 12px !important;
    position: relative !important;
    box-shadow: 0 2px 10px rgba(22, 47, 92, 0.02) !important;
  }
  .cart-layout td:first-child {
    padding: 0 0 10px 0 !important;
    border-bottom: 1px solid rgba(22, 47, 92, 0.04) !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
  }
  .cart-layout td:nth-child(2) {
    padding: 6px 0 !important;
    font-size: 13px !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  .cart-layout td:nth-child(2)::before {
    content: "Format:" !important;
    font-weight: 700 !important;
    color: var(--deep-navy) !important;
  }
  .cart-layout td:nth-child(3) {
    padding: 6px 0 !important;
    font-size: 13px !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  .cart-layout td:nth-child(3)::before {
    content: "Price:" !important;
    font-weight: 700 !important;
    color: var(--deep-navy) !important;
  }
  .cart-layout td:nth-child(4) {
    padding: 6px 0 !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
  }
  .cart-layout td:nth-child(4)::before {
    content: "Quantity:" !important;
    font-weight: 700 !important;
    color: var(--deep-navy) !important;
  }
  .cart-layout td:nth-child(5) {
    padding: 8px 0 0 0 !important;
    border-top: 1px dashed rgba(22, 47, 92, 0.04) !important;
    font-weight: 800 !important;
    display: flex !important;
    justify-content: space-between !important;
  }
  .cart-layout td:nth-child(5)::before {
    content: "Total:" !important;
    font-weight: 700 !important;
    color: var(--deep-navy) !important;
  }
  .cart-layout td:nth-child(6) {
    position: absolute !important;
    top: 12px !important;
    right: 12px !important;
    width: auto !important;
    padding: 0 !important;
    border: none !important;
  }

  /* Checkout fields stack */
  .checkout-layout {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }
  .checkout-layout div[style*="display: grid"],
  .checkout-layout div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }
  .checkout-layout input,
  .checkout-layout textarea {
    padding: 12px 15px !important;
    font-size: 14px !important;
  }

  /* Spacing adjustments */
  .section-wrapper {
    padding: 36px 0 !important;
  }
  .section-header {
    margin-bottom: 16px !important;
    padding: 0 16px !important;
  }
  .section-title {
    font-size: 20px !important;
  }
  
  /* Product Grid adjustments */
  .book-card {
    padding: 10px !important;
    border-radius: 12px !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
    box-shadow: 0 4px 15px rgba(22, 47, 92, 0.03) !important;
  }
  .book-img-wrapper {
    height: 150px !important;
    margin-bottom: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .book-cover {
    max-height: 100% !important;
    width: auto !important;
    object-fit: contain !important;
  }
  .book-title-bg {
    font-size: 13px !important;
    font-weight: 700 !important;
    height: 34px !important; 
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    margin-bottom: 3px !important;
    line-height: 1.3 !important;
  }
  .book-title-en {
    display: none !important; 
  }
  .book-author {
    font-size: 11px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    margin-bottom: 4px !important;
  }
  .book-rating {
    display: none !important; 
  }
  .price-container {
    margin-bottom: 8px !important;
    align-items: baseline !important;
  }
  .price-selling {
    font-size: 13px !important;
    font-weight: 700 !important;
  }
  .price-mrp {
    font-size: 11px !important;
  }
  .add-to-cart-btn {
    padding: 8px 10px !important;
    font-size: 11px !important;
    border-radius: 20px !important;
    margin-top: auto !important;
    height: 36px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
  }
  .discount-badge {
    padding: 3px 6px !important;
    font-size: 9px !important;
    top: 6px !important;
    left: 6px !important;
  }
  .wishlist-toggle {
    width: 32px !important;
    height: 32px !important;
    font-size: 16px !important;
    top: 6px !important;
    right: 6px !important;
  }

  /* Horizontal swipe carousels on mobile */
  .books-slider {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 15px !important;
    padding-bottom: 10px !important;
  }
  .books-slider::-webkit-scrollbar {
    display: none !important;
  }
  .books-slider > div {
    scroll-snap-align: start !important;
    flex: 0 0 160px !important;
    min-width: 160px !important;
  }
  .slider-arrow {
    display: none !important;
  }

  /* Categories Grid adjustments - Horizontal swipe side-by-side */
  .categories-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 15px !important;
    padding: 10px 16px !important;
  }
  .categories-grid::-webkit-scrollbar {
    display: none !important;
  }
  .category-card {
    flex: 0 0 100px !important;
    min-width: 100px !important;
    padding: 15px 5px !important;
    text-align: center !important;
    scroll-snap-align: start !important;
  }
  .category-icon-wrapper {
    width: 48px !important;
    height: 48px !important;
    font-size: 20px !important;
    margin: 0 auto 10px !important;
  }
  .category-name {
    font-size: 11px !important;
  }

  /* Section Header & View All alignment */
  .section-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 16px !important;
    padding: 0 16px !important;
    gap: 10px !important;
  }
  .section-title {
    font-size: 19px !important;
    line-height: 1.25 !important;
  }
  .view-all-btn {
    font-size: 12px !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
    padding: 4px 8px !important;
  }

  /* Collections Grid adjustments - Horizontal swipe side-by-side */
  .collections-grid {
    display: flex !important;
    overflow-x: auto !important;
    scroll-snap-type: x mandatory !important;
    -webkit-overflow-scrolling: touch !important;
    gap: 15px !important;
    padding: 10px 16px !important;
  }
  .collections-grid::-webkit-scrollbar {
    display: none !important;
  }
  .collection-card {
    flex: 0 0 200px !important;
    min-width: 200px !important;
    height: 140px !important;
    scroll-snap-align: start !important;
  }
  .collection-title {
    font-size: 14px !important;
  }

  /* Authors Grid adjustments */
  .authors-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px !important;
    padding: 0 16px !important;
  }
  .author-photo-wrapper {
    width: 70px !important;
    height: 70px !important;
    border-radius: 50% !important;
    margin: 0 auto 10px !important;
    overflow: hidden !important;
  }
  .author-photo {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
  }
  .author-name {
    font-size: 13px !important;
    line-height: 1.2 !important;
    text-align: center !important;
    word-break: break-word !important;
  }
  .author-view-btn {
    font-size: 11px !important;
    text-align: center !important;
    display: block !important;
    margin-top: 4px !important;
  }

  /* About Section stack styling */
  .about-prakashani-content p {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
  .about-prakashani-features {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
    width: 100% !important;
  }
  .feature-item {
    align-items: center !important;
    text-align: center !important;
    flex-direction: column !important;
  }

  /* Compact promotional banner */
  .promo-banner-section {
    padding: 20px 16px !important;
  }
  .promo-banner-card {
    padding: 30px 20px !important;
  }
  .promo-title {
    font-size: 20px !important;
  }
  .promo-desc {
    font-size: 13px !important;
  }

  /* Mobile footer collapse accordions */
  .footer-column h4 {
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 8px;
    margin-bottom: 10px !important;
  }
}

@media screen and (max-width: 400px) {
  .categories-grid {
    grid-template-columns: repeat(3, 1fr) !important;
  }
}

