
/* Dark Mode Variables */
body.dark-mode {
  --color-bg: #121212;
  --color-surface: #1e1e1e;
  --color-text: #e0e0e0;
  --color-text-muted: #a0a0a0;
  --color-border: #333333;
}
body.dark-mode .product-card, body.dark-mode .modal-content {
  background: var(--color-surface);
  border-color: var(--color-border);
}
body.dark-mode .product-info, body.dark-mode .action-container {
  background: var(--color-surface);
}
body.dark-mode input, body.dark-mode select, body.dark-mode textarea {
  background: #262626 !important;
  color: #e0e0e0 !important;
  border-color: #444 !important;
}
body.dark-mode .trust-value-ribbon,
body.dark-mode .sidebar-categories,
body.dark-mode .checkout-wrapper,
body.dark-mode .chk-box,
body.dark-mode .table-wrap {
  background: var(--color-surface) !important;
  border-color: var(--color-border) !important;
  color: var(--color-text) !important;
}
body.dark-mode .chk-total,
body.dark-mode h1, body.dark-mode h2, body.dark-mode h3, body.dark-mode h4 {
  color: #f1f5f9;
}

.bundle-badge { background: #8b5cf6; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-left: 5px; }
.preorder-badge { background: #3b82f6; color: white; padding: 2px 6px; border-radius: 4px; font-size: 10px; margin-left: 5px; }

/* Amazon Inspired Color Palette & Design System */
:root {
  --color-primary: #ff9900;
  --color-primary-dark: #e38900;
  --color-secondary: #131921; /* Deep Navy Header */
  --color-nav: #232f3e; /* Lighter Navy Sub-nav */
  --color-bg: #eaeded; /* Soft Gray Background */
  --color-surface: #ffffff;
  --color-text: #0f1111;
  --color-text-muted: #565959;
  --color-border: #d5d9d9;
  --color-danger: #B12704;
  --color-success: #007600;
  --color-warning: #e47911;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 24px rgba(0,0,0,0.15);
  --transition-smooth: all 0.2s ease-in-out;
}
* { margin:0; padding:0; box-sizing:border-box; font-family:'Inter','Hind Siliguri',sans-serif; }
body { background:var(--color-bg); color:var(--color-text); -webkit-font-smoothing: antialiased; overflow-x: hidden; }

/* Header & Nav */
header { background:var(--color-secondary); padding:12px 5%; display:flex; justify-content:space-between; align-items:center; gap:20px; flex-wrap:wrap; }
.logo { 
  font-family: 'Montserrat', 'Inter', sans-serif;
  font-size: 32px; 
  font-weight: 900; 
  font-style: italic;
  letter-spacing: -0.5px;
  color: #fff; 
  text-decoration: none; 
  display: inline-flex; 
  align-items: center; 
  gap: 0px; 
  line-height: 1;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.logo:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}
.logo span { 
  display: inline-block;
  color: var(--color-primary); 
}

.search-container { display:flex; flex:1; max-width:800px; min-width:280px; order:2; position:relative; }
.search-container input { width:100%; padding:12px 20px; border:none; border-radius:4px 0 0 4px; outline:none; font-size:15px; }
.search-container button { padding:0 24px; background:var(--color-primary); border:none; color:#111; cursor:pointer; border-radius:0 4px 4px 0; font-weight:700; font-size:15px; transition:var(--transition-smooth); display:flex; align-items:center; justify-content:center;}
.search-container button:hover { background:var(--color-primary-dark); }

.header-actions { display:flex; align-items:center; gap:24px; white-space:nowrap; order:3; }
.header-actions a { text-decoration:none; color:#ffffff; font-weight:700; font-size:14px; cursor:pointer; display:flex; align-items:center; gap:6px; transition:var(--transition-smooth); }
.header-actions a:hover { color:var(--color-primary); }
.header-actions svg { stroke: currentColor; width:22px; height:22px; }

/* Scrollable Category Nav */
nav { background:var(--color-nav); padding:0 5%; overflow-x:auto; scroll-behavior:smooth; -webkit-overflow-scrolling:touch; scrollbar-width:none; }
nav::-webkit-scrollbar { display:none; }
nav ul { list-style:none; display:flex; gap:16px; align-items:center; width:max-content; padding: 4px 0; }
nav ul li a { display:block; color:#ffffff; text-decoration:none; font-size:14px; font-weight:500; padding:12px 8px; white-space:nowrap; border-bottom:3px solid transparent; transition:var(--transition-smooth); cursor:pointer; }
nav ul li a:hover, nav ul li a.active { color:var(--color-primary); border-bottom-color:var(--color-primary); }

/* Dropdown styling */
nav ul li { position: relative; }
nav ul li .dropdown-menu {
  position: absolute; top: 100%; left: 0; background: var(--color-surface);
  min-width: 200px; box-shadow: var(--shadow-lg); border-radius: var(--radius-md);
  display: flex; flex-direction: column; opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: all 0.2s ease; z-index: 100;
  border: 1px solid var(--color-border); padding: 8px 0;
}
nav ul li:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
nav ul li .dropdown-menu a {
  color: var(--color-text); padding: 10px 20px; border-bottom: none; font-size: 14px;
}
nav ul li .dropdown-menu a:hover {
  background: var(--color-bg); color: var(--color-primary);
}
body.dark-mode nav ul li .dropdown-menu { background: var(--color-surface); border-color: var(--color-border); }
body.dark-mode nav ul li .dropdown-menu a { color: var(--color-text); }
body.dark-mode nav ul li .dropdown-menu a:hover { background: var(--color-bg); }

/* Skeleton Loading System */
.skeleton-card { background:#fff; border-radius:var(--radius-md); padding:16px; display:flex; flex-direction:column; gap:12px; height:380px; border:1px solid var(--color-border); }
.skeleton-img { width:100%; aspect-ratio:1/1; background:#e2e8f0; border-radius:var(--radius-sm); animation:pulse 1.5s infinite; }
.skeleton-text { height:16px; background:#e2e8f0; border-radius:4px; animation:pulse 1.5s infinite; }
.skeleton-text.short { width:60%; }
.skeleton-button { height:40px; background:#e2e8f0; border-radius:20px; animation:pulse 1.5s infinite; margin-top:auto; }
@keyframes pulse { 0% {opacity:1;} 50% {opacity:0.5;} 100% {opacity:1;} }
.spinner { border: 3px solid rgba(255,255,255,0.3); width: 20px; height: 20px; border-radius: 50%; border-left-color: #fff; animation: spin 1s linear infinite; display:inline-block; }
.spinner.dark { border-color: rgba(0,0,0,0.1); border-left-color: var(--color-primary); }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* Advanced Banners */
.banner-container { margin:16px 5%; border-radius:var(--radius-lg); overflow:hidden; position:relative; display:none; background:#fff; box-shadow:var(--shadow-sm); }
.banner-slider { display:flex; overflow-x:auto; scroll-snap-type:x mandatory; scroll-behavior:smooth; -ms-overflow-style:none; scrollbar-width:none; }
.banner-slider::-webkit-scrollbar { display:none; }.banner-slide { flex:0 0 100%; scroll-snap-align:start; aspect-ratio: 16/5; height:auto; min-height:120px; max-height:400px; background-size:cover; background-repeat:no-repeat; background-position:center center; background-color:#f4f4f4; cursor:pointer; position:relative; }
a.banner-slide { text-decoration:none; color:inherit; cursor:pointer; }
a.banner-slide:hover { opacity:0.95; }

/* Top Actions */
.product-toolbar { display:flex; justify-content:space-between; align-items:center; padding:16px 5%; background:#fff; border-bottom:1px solid var(--color-border); }
.product-count { font-size:14px; font-weight:600; color:var(--color-text-muted); }
.sort-select { padding:8px 12px; border:1px solid var(--color-border); border-radius:4px; font-size:13px; font-weight:600; outline:none; background:#f8fafc; cursor:pointer; width:auto; min-width:130px; box-shadow:none; }

/* Product Grid & Cards */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; padding: 24px 5% 40px 5%; }
.product-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); display: flex; flex-direction: column; overflow: hidden; transition: var(--transition-smooth); position: relative; }
.product-card:hover { box-shadow: var(--shadow-md); border-color: transparent; }
.product-image-wrapper { position:relative; padding:20px; cursor: pointer; background-color: #f8fafc; transition:var(--transition-smooth);}
.product-image { width: 100%; aspect-ratio: 1 / 1; background-size: contain; background-repeat: no-repeat; background-position: center; transition:transform 0.4s ease; mix-blend-mode: multiply; }
/* V11: ছবির লিংক ভাঙা হলে খালি বাক্সের বদলে ভদ্র প্লেসহোল্ডার */
.product-image.tm-img-broken { background-color:#f1f5f9; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='1.5'%3E%3Cpath d='M6 2 3 6v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6l-3-4z'/%3E%3Cpath d='M3 6h18'/%3E%3Cpath d='M16 10a4 4 0 0 1-8 0'/%3E%3C/svg%3E") !important; background-size: 34% auto !important; background-repeat: no-repeat !important; background-position: center !important; opacity: .8; }
.product-card:hover .product-image { transform:scale(1.05); }

.look-inside-badge { position:absolute; bottom:12px; left:50%; transform:translateX(-50%); background:rgba(255,255,255,0.95); border:1px solid #131921; color:#131921; font-size:12px; font-weight:700; padding:6px 14px; border-radius:20px; box-shadow:var(--shadow-sm); opacity:0; transition:var(--transition-smooth); display:flex; align-items:center; gap:6px; white-space:nowrap;}
.product-card:hover .look-inside-badge { opacity:1; bottom:20px; }

.product-info { padding: 16px 16px 0 16px; display: flex; flex-direction: column; flex-grow: 1; background:var(--color-surface); z-index:2; }
.product-title { font-size: 15px; font-weight: 500; color: #007185; line-height: 1.4; height: 42px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 6px; cursor: pointer; transition:var(--transition-smooth); }
.product-title:hover { color:#c45500; text-decoration: underline; }

.rating-stars { display:flex; gap:2px; margin-bottom:12px; color:var(--color-warning); font-size:14px; align-items:center;}
.rating-count { font-size:12px; color:#007185; margin-left:6px; font-weight:400;}

.badge-discount { position: absolute; top: 12px; left: 12px; background: var(--color-danger); color: #ffffff; font-size: 11px; font-weight: 800; padding: 4px 8px; border-radius: 4px; z-index: 3; }
.product-price-container { margin-bottom:16px; display:flex; align-items:flex-end; gap:8px; margin-top:auto; }
.sale-price { font-size:22px; font-weight:700; color:var(--color-text); letter-spacing:-0.5px; line-height:1;}
.reg-price { font-size:13px; color:var(--color-text-muted); text-decoration:line-through; margin-bottom:2px; font-weight:400;}

.action-container { display:flex; flex-direction:column; gap:8px; padding:0 16px 16px 16px; background:var(--color-surface); z-index:2;}
.add-to-cart { width:100%; padding:10px; background:var(--color-primary); border:1px solid var(--color-primary-dark); color:#111; border-radius:20px; cursor:pointer; font-weight:600; font-size:14px; transition:var(--transition-smooth); display:flex; align-items:center; justify-content:center; gap:8px;}
.add-to-cart:hover:not(:disabled) { background:var(--color-primary-dark); }
.add-to-cart:disabled { border-color:var(--color-border); color:var(--color-text-muted); cursor:not-allowed; background:#f1f5f9; }

.load-more-container { text-align:center; padding:20px 5% 60px; }

/* Modals & Overlays */
.overlay { position:fixed; inset:0; background:rgba(0, 0, 0, 0.6); backdrop-filter:blur(2px); display:none; z-index:990; opacity:0; transition:var(--transition-smooth); }
.overlay.show { display:block; opacity:1; }
.modal { position:fixed; top:0; left:0; width:100%; height:100%; display:none; align-items:center; justify-content:center; z-index:1000; padding:20px; opacity:0; transform:scale(0.95); transition:all 0.3s cubic-bezier(0.16, 1, 0.3, 1); pointer-events:none;}
.modal.show { display:flex; opacity:1; transform:scale(1); pointer-events:auto;}
.modal-content { background:var(--color-surface); border-radius:var(--radius-md); padding:32px; max-width:480px; width:100%; position:relative; box-shadow:var(--shadow-lg); max-height:90vh; overflow-y:auto; }
.modal-content.wide { max-width: 900px; }
.modal-content.full-page-feel { max-width:1100px; height: 90vh; padding:0; display:flex; flex-direction:column; overflow:hidden;}
.modal-header-fixed { display:flex; justify-content:space-between; align-items:center; padding:16px 24px; border-bottom:1px solid var(--color-border); background:#f8fafc; z-index:10; position:sticky; top:0;}
.modal-body-scrollable { flex:1; overflow-y:auto; padding:24px; background:#fff;}
.close-btn { background:transparent; border:none; width:44px; height:44px; border-radius:50%; font-size:24px; cursor:pointer; color:var(--color-text-muted); display:flex; align-items:center; justify-content:center; transition:var(--transition-smooth); }
.close-btn:hover { background:#fee2e2; color:var(--color-danger); }

/* Forms */
form { display:flex; flex-direction:column; gap:20px; }
.form-group { display:flex; flex-direction:column; gap:8px; }
.form-group label { font-size:14px; font-weight:700; color:var(--color-secondary); }
input, textarea, select { padding:14px 16px; border:1px solid #888C8C; border-radius:4px; font-size:15px; outline:none; transition:var(--transition-smooth); background:#fff; width:100%; box-shadow: inset 0 1px 2px rgba(0,0,0,0.05);}
input:focus, textarea:focus, select:focus { border-color:var(--color-warning); box-shadow:0 0 0 3px rgba(228, 121, 17, 0.2); }
.btn-primary { background:var(--color-primary); color:#111; border:1px solid var(--color-primary-dark); padding:14px 24px; border-radius:24px; font-weight:700; cursor:pointer; transition:var(--transition-smooth); font-size:15px; display:inline-flex; align-items:center; justify-content:center; gap:10px; box-shadow: 0 1px 3px rgba(0,0,0,0.1);}
.btn-primary:hover { background:var(--color-primary-dark); }
.btn-text { background:none; border:none; color:#007185; font-weight:600; font-size:14px; cursor:pointer; text-decoration:underline; padding:0; display:inline-block; }
.btn-text:hover { color:#c45500; }
.form-grid-2 { display:grid; grid-template-columns:1fr 1fr; gap:20px; }

/* Dashboard Panel */
.dashboard-layout { display: flex; flex: 1; overflow: hidden; background:#fff; }
.dashboard-sidebar { width: 280px; background: #f8fafc; border-right: 1px solid var(--color-border); padding: 32px 0; flex-shrink: 0; display:flex; flex-direction:column; overflow-y: auto; }
.dashboard-user-info { display: flex; flex-direction: column; align-items: center; padding: 0 20px 24px; border-bottom: 1px solid var(--color-border); margin-bottom: 16px; text-align:center;}
.dashboard-avatar-wrapper { position: relative; margin-bottom: 16px; }
.dashboard-avatar { width: 90px; height: 90px; border-radius: 50%; background: #007185; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 32px; font-weight: 700; background-size: cover; background-position: center; border: 3px solid #fff; box-shadow: var(--shadow-sm); }
.avatar-upload-btn { position: absolute; bottom: 0; right: 0; background: #fff; color: var(--color-secondary); width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid var(--color-border); font-size: 14px; }
.dashboard-menu { list-style: none; display: flex; flex-direction: column; gap:4px; padding:0 12px;}
.dashboard-menu a { display: flex; align-items: center; gap: 12px; padding: 14px 20px; color: var(--color-text); font-weight: 600; font-size: 15px; text-decoration: none; transition: var(--transition-smooth); border-radius:8px; cursor:pointer; flex-shrink:0; }
.dashboard-menu a:hover { background: #e2e8f0; }
.dashboard-menu a.active { background: #dbeafe; color: #007185; font-weight:700; }
.dashboard-content { flex: 1; padding: 32px; padding-bottom: 80px; overflow-y: auto; background:#fff;}
.dash-panel { display:none; animation:fadeInUp 0.2s ease; }
.dash-panel.active { display:block; }

/* Expanded Order Styles */
.order-card { border:1px solid var(--color-border); border-radius:8px; padding:20px; background:#fff; margin-bottom:16px; transition:var(--transition-smooth); }
.order-card:hover { box-shadow:var(--shadow-md); }
.order-header-info { display:flex; justify-content:space-between; border-bottom:1px solid #eaeded; padding-bottom:12px; margin-bottom:16px; flex-wrap:wrap; gap:16px; }
.order-details-expanded { display:none; border-top:1px dashed var(--color-border); padding-top:16px; margin-top:16px; animation:fadeInUp 0.3s ease; }
.order-details-expanded.open { display:block; }

/* Full Page Product View (Previously Quick View) */
.qv-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 16px; align-items: flex-start; }
.qv-gallery { position:sticky; top:80px; }
.qv-main-img-wrap { width:fit-content; max-width:100%; height:auto; max-height:480px !important; margin-bottom:8px !important; border-radius:12px; overflow:hidden; background:#fff; margin:0 auto; display:flex; align-items:center; justify-content:center; cursor:pointer; position:relative; box-shadow:var(--shadow-sm); }
.qv-main-img-wrap img { width:auto; max-width:100%; height:auto; max-height:600px; object-fit:contain; transition:opacity 0.3s; display:block; }

/* Amazon Style Zoom Overlay */
.qv-zoom-window {
    position: absolute;
    top: 0;
    left: calc(100% + 32px);
    width: 100%;
    height: 100%;
    background-color: #fff;
    background-repeat: no-repeat;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: none;
    pointer-events: none;
}

.qv-thumbs { display:flex; gap:8px; overflow-x:auto; padding-bottom:4px; }
.qv-thumb { width:64px; height:64px; border-radius:8px; background-size:cover; background-position:center; cursor:pointer; border:2px solid #e2e8f0; transition:all 0.2s; flex-shrink:0; }
.qv-thumb.active, .qv-thumb:hover { border-color:var(--color-primary); box-shadow:0 0 0 2px rgba(255,153,0,0.3); }
.qv-info { display: flex; flex-direction: column; gap: 12px; }
.qv-title { font-size:32px; font-weight:800; color:var(--color-secondary); line-height:1.3; }
.qv-category { font-size:14px; color:var(--color-text-muted); font-weight:500; background:#f1f5f9; padding:6px 14px; border-radius:20px; display:inline-block; }
.qv-price-area { display:flex; align-items:baseline; gap:10px; flex-wrap:wrap; }
.qv-price-current { font-size:36px; font-weight:800; color:var(--color-danger); }
.qv-price-old { font-size:20px; color:#94a3b8; text-decoration:line-through; }
.qv-price-discount { font-size:14px; font-weight:700; color:#fff; background:var(--color-danger); padding:4px 12px; border-radius:20px; }
.qv-stock { font-size:15px; font-weight:600; padding:8px 16px; border-radius:8px; }
.qv-stock.in { background:#dcfce7; color:#166534; }
.qv-stock.low { background:#fef3c7; color:#92400e; }
.qv-stock.out { background:#fef2f2; color:#991b1b; }
.qv-specs-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top: 10px;}
.qv-spec-item { background:#f8fafc; padding:12px 16px; border-radius:8px; border:1px solid #e2e8f0; display:flex; flex-direction:column; gap:4px; }
.qv-spec-label { font-size:13px; color:var(--color-text-muted); font-weight:600; }
.qv-spec-value { font-size:15px; font-weight:600; color:var(--color-secondary); }

/* Description Read More Layout */
.qv-description { margin-top: 16px !important; padding: 16px !important; font-size:16px; line-height:1.7; color:#475569; background:#fff; border-radius:8px; border:1px solid #e2e8f0; box-shadow: var(--shadow-sm); }
.qv-desc-content { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; transition: all 0.3s ease; }
.qv-desc-content.expanded { -webkit-line-clamp: unset; }
.qv-read-more-btn { background:none; border:none; color:var(--color-primary-dark); font-weight:700; cursor:pointer; padding:0; margin-top:12px; font-size:15px; text-decoration:underline; }
.qv-read-more-btn:hover { color:var(--color-danger); }

.qv-actions { display:flex; gap:16px; flex-wrap:wrap; padding-top:16px; }
.qv-btn { padding:16px 32px; border-radius:8px; font-size:16px; font-weight:700; cursor:pointer; border:none; transition:all 0.2s; text-decoration:none; display:inline-flex; align-items:center; gap:8px; text-align:center; justify-content:center; flex: 1; min-width: 200px;}
.qv-btn-primary { background:var(--color-primary); color:#111; }
.qv-btn-primary:hover { background:var(--color-primary-dark); transform:translateY(-2px); }
.qv-btn-secondary { background:var(--color-secondary); color:#fff; }
.qv-btn-secondary:hover { background:#1a2533; transform:translateY(-2px); }
.qv-btn-outline { background:transparent; border:2px solid var(--color-primary); color:var(--color-primary); }
.qv-btn-outline:hover { background:var(--color-primary); color:#111; }
.qv-btn-disabled { background:#e2e8f0; color:#94a3b8; cursor:not-allowed; }
.qv-reviews-section { margin-top: 28px !important; padding-top: 20px !important; border-top:1px solid #e2e8f0; }

@media (max-width:768px) {
  .qv-layout { grid-template-columns:1fr; gap: 24px; }
  .qv-gallery { position:static; }
  .qv-specs-grid { grid-template-columns:1fr; }
  .qv-btn { width: 100%; flex: unset; }
  .qv-trust-badges { grid-template-columns: 1fr; }
  .p-tab-btn { padding: 14px 16px; font-size: 14px; }
  .product-tabs-body { padding: 16px; }
  #productPageContainer { padding-bottom: 70px; }
}

/* Quantity Selector & Trust Badges */
.qv-qty-row { display: flex; align-items: center; gap: 14px; margin: 16px 0 8px 0; flex-wrap: wrap; }
.qv-qty-label { font-size: 14px; font-weight: 700; color: var(--color-text); }
.qv-qty-control { display: inline-flex; align-items: center; border: 1.5px solid var(--color-border); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.qv-qty-btn { width: 38px; height: 38px; background: #f8fafc; border: none; font-size: 18px; font-weight: 800; cursor: pointer; color: var(--color-secondary); transition: background 0.15s; display: flex; align-items: center; justify-content: center; user-select: none; }
.qv-qty-btn:hover { background: #e2e8f0; }
.qv-qty-btn:active { background: #cbd5e1; }
#qvQtyInput { width: 50px; height: 38px; text-align: center; font-size: 16px; font-weight: 800; border: none; border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border); color: var(--color-secondary); background: #fff; }
.qv-qty-stock-hint { font-size: 13px; color: var(--color-text-muted); font-weight: 600; }

.qv-btn-whatsapp { background: #25D366; color: #fff; padding: 14px 24px; border-radius: 8px; font-weight: 700; font-size: 15px; border: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: all 0.2s; width: 100%; box-shadow: 0 2px 8px rgba(37, 211, 102, 0.25); text-decoration: none; margin-top: 10px; }
.qv-btn-whatsapp:hover { background: #1ebd59; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35); }

.qv-trust-badges { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 20px; padding: 16px; background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; }
.qv-trust-item { display: flex; align-items: center; gap: 10px; }
.qv-trust-icon { font-size: 20px; width: 36px; height: 36px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,0.08); flex-shrink: 0; }
.qv-trust-text { display: flex; flex-direction: column; }
.qv-trust-text strong { font-size: 13px; color: var(--color-secondary); font-weight: 700; }
.qv-trust-text span { font-size: 11px; color: var(--color-text-muted); }

/* Dynamic Product Tabs */
.product-tabs-container { margin-top: 40px; border: 1px solid var(--color-border); border-radius: 12px; background: #fff; overflow: hidden; box-shadow: var(--shadow-sm); }
.product-tabs-header { display: flex; background: #f8fafc; border-bottom: 1px solid var(--color-border); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.p-tab-btn { padding: 16px 24px; font-size: 15px; font-weight: 700; color: var(--color-text-muted); background: none; border: none; cursor: pointer; border-bottom: 3px solid transparent; transition: all 0.2s; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.p-tab-btn:hover { color: var(--color-primary-dark); }
.p-tab-btn.active { color: var(--color-primary-dark); background: #fff; border-bottom: 3px solid var(--color-primary); }
.product-tabs-body { padding: 24px; }
.p-tab-pane { animation: fadeIn 0.25s ease-in-out; }
.p-desc-box { font-size: 15px; line-height: 1.8; color: #334155; white-space: pre-wrap; }

/* Recommendation Sections */
.product-recommendation-section { margin-top: 36px; }

/* Mobile Sticky Purchase Bar */
.mobile-sticky-bar { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid var(--color-border); padding: 10px 16px; box-shadow: 0 -4px 16px rgba(0,0,0,0.1); z-index: 90; display: flex; align-items: center; justify-content: space-between; gap: 12px; animation: slideUp 0.3s ease; }
body.modal-open .mobile-sticky-bar,
body:has(.modal.show) .mobile-sticky-bar,
body:has(.overlay.show) .mobile-sticky-bar,
body:has(.cart-drawer.open) .mobile-sticky-bar {
  display: none !important;
}
.sticky-bar-info { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.sticky-bar-info img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; border: 1px solid #e2e8f0; background: #f8fafc; flex-shrink: 0; }
.sticky-bar-text { min-width: 0; flex: 1; }
.sticky-bar-title { font-size: 13px; font-weight: 700; color: var(--color-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sticky-bar-price { font-size: 15px; font-weight: 800; color: var(--color-danger); }
.sticky-bar-actions { display: flex; gap: 8px; flex-shrink: 0; }
.sticky-btn-cart { background: #f1f5f9; color: var(--color-secondary); border: 1px solid #cbd5e1; padding: 10px 14px; border-radius: 8px; font-weight: 700; font-size: 13px; cursor: pointer; }
.sticky-btn-buy { background: var(--color-primary); color: #111; border: none; padding: 10px 16px; border-radius: 8px; font-weight: 800; font-size: 13px; cursor: pointer; box-shadow: 0 2px 6px rgba(255,153,0,0.3); }

@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

/* Review Section */
.review-section { border-top:1px solid var(--color-border); padding-top:32px;}
.review-box { background: #fff; padding: 20px; border-radius: 8px; border: 1px solid var(--color-border); margin-bottom: 16px; }
.review-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px;}
.review-author { font-weight:700; font-size:14px; color:var(--color-secondary); display:flex; align-items:center; gap:8px;}
.review-author::before { content:'👤'; font-size:16px; }
.star-input { display:flex; gap:4px; flex-direction:row-reverse; justify-content:flex-end; }
.star-input input { display:none; }
.star-input label { font-size:28px; color:#d5d9d9; cursor:pointer; transition:color 0.2s; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color:var(--color-warning); }

/* Cart Drawer */
.cart-drawer { position:fixed; top:0; right:-480px; width:420px; max-width:90vw; height:100%; background:#fff; z-index:1010; transition:right 0.3s cubic-bezier(0.16, 1, 0.3, 1); display:flex; flex-direction:column; box-shadow:-5px 0 20px rgba(0,0,0,0.1); }
.cart-drawer.open { right:0; }
.drawer-header { display:flex; justify-content:space-between; align-items:center; padding:20px 24px; border-bottom:1px solid var(--color-border); background:#eaeded; }
.cart-items { flex:1; overflow-y:auto; padding:24px; display:flex; flex-direction:column; gap:16px; background:#f8fafc;}
.cart-item { display:flex; gap:16px; padding:16px; border:1px solid var(--color-border); border-radius:8px; background:#fff; }
.cart-item-img { width:60px; height:60px; background-size:contain; background-repeat:no-repeat; background-position:center; mix-blend-mode:multiply; }
.cart-item-info { flex:1; display:flex; flex-direction:column; justify-content:space-between;}
.cart-item-controls { display:flex; align-items:center; gap:12px; margin-top:8px;}
.cart-item-controls button { width:44px; height:44px; border-radius:4px; border:1px solid var(--color-border); background:#f1f5f9; cursor:pointer; font-weight:bold; font-size:16px; color:#111; display:flex; align-items:center; justify-content:center; }
.cart-item-controls button:hover { background:#e2e8f0; }

.cart-footer { padding:24px; border-top:1px solid var(--color-border); background:#fff; display:flex; flex-direction:column; gap:16px; }
.billing-summary { background:#fff; padding:16px; border-radius:8px; border:1px solid var(--color-border); }
.billing-row { display:flex; justify-content:space-between; margin-bottom:8px; font-size:14px; font-weight:500; color:var(--color-text); }
.billing-total { border-top:1px solid #d5d9d9; padding-top:12px; margin-top:8px; font-size:18px; font-weight:800; color:var(--color-danger); }

.toast { position:fixed; bottom:40px; left:50%; transform:translateX(-50%) translateY(20px); background:#111; color:#fff; padding:14px 24px; border-radius:8px; font-size:14px; opacity:0; pointer-events:none; transition:var(--transition-smooth); z-index:1100; text-align:center; font-weight:600; box-shadow:var(--shadow-lg); }
.toast.show { opacity:1; transform:translateX(-50%) translateY(0); }

/* Payment Gateways */
.payment-methods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 12px; }
.payment-card-option { border: 1px solid var(--color-border); border-radius: 6px; padding: 16px; display: flex; align-items: center; gap: 12px; cursor: pointer; transition: var(--transition-smooth); background: #fff; }
.payment-card-option:hover, .payment-card-option.selected { border-color: var(--color-warning); background: #fffaf0; }
.payment-card-option input[type="radio"] { accent-color: var(--color-warning); transform:scale(1.3); }

/* Timeline */
.tracking-timeline { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; position: relative; padding: 0 10px; }
.tracking-timeline::before { content: ''; position: absolute; top: 14px; left: 30px; right: 30px; height: 3px; background: var(--color-border); z-index: 1; }
.tracking-step { position: relative; z-index: 2; background: #fff; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.step-icon { width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 3px solid var(--color-border); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: bold; color: var(--color-text-muted); }
.tracking-step.completed .step-icon { background: var(--color-success); border-color: var(--color-success); color: #ffffff; }
.tracking-step.active .step-icon { background: var(--color-warning); border-color: var(--color-warning); color: #ffffff; }

/* Tabs */
.tabs { display:flex; margin-bottom:24px; border-bottom:1px solid var(--color-border); }
.tab-btn { flex:1; background:none; border:none; padding:12px; font-weight:700; cursor:pointer; color:var(--color-text-muted); border-bottom:3px solid transparent; transition:var(--transition-smooth); font-size:16px; }
.tab-btn.active { color:#e47911; border-bottom-color:#e47911; }
.tab-panel { display:none; flex-direction:column; gap:16px; }
.tab-panel.active { display:flex; }
.custom-datalist-input { background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23888C8C" viewBox="0 0 16 16"><path d="M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z"/></svg>') no-repeat 96% center; padding-right: 40px !important; }

@media (max-width:768px) {
  header { padding:12px 4%; }
  .logo { font-size: 26px; }
  .search-container { max-width:100%; flex:1 1 100%; order:3; margin-top:12px;}
  .header-actions { order:2; }
  
  /* Fix Profile Scroll for Mobile */
  .modal-content.full-page-feel { border-radius:0; height:100dvh; }
  .dashboard-layout { flex-direction: column; display: flex; height: calc(100dvh - 60px); }
  .dashboard-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--color-border); padding-bottom:16px; flex-shrink: 0;}
  .dashboard-menu { flex-direction: row; overflow-x: auto; white-space: nowrap; padding:0 16px;}
  .dashboard-content { flex: 1; padding:16px 4% 100px 4%; overflow-y: auto; }
  
  .product-grid { padding:24px 4% 40px 4%; grid-template-columns:repeat(auto-fill, minmax(160px, 1fr)); gap:16px; }
  .form-grid-2 { grid-template-columns:1fr; }

}
  @keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

/* Checkout Responsive Fixes */
.modal-body-flex { display: flex; gap: 24px; align-items: flex-start; flex-direction: row; }
@media (max-width: 768px) {
    .modal-body-flex { flex-direction: column !important; }
}

.checkout-wrapper { margin: 40px auto; width: 90%; }
.chk-right-col { width: 380px; }
.chk-flex-row { display: flex; gap: 16px; }

@media (max-width: 768px) {
    .checkout-wrapper { margin: 10px auto !important; width: 95% !important; min-height: 100vh !important; }
    .chk-right-col { width: 100% !important; }
    .chk-flex-row { flex-direction: column !important; gap: 12px !important; }
    .modal { padding: 0 !important; }
}

/* Dark Mode Extended — Header, Footer, Cart, Nav */
body.dark-mode header { background: #0a0a0a; }
body.dark-mode nav { background: #1a1a1a; }
body.dark-mode nav ul li a { color: #cbd5e1; }
body.dark-mode footer { background: #0a0a0a !important; }
body.dark-mode .product-toolbar { background: #1e1e1e; border-color: #333; }
body.dark-mode .skeleton-img, body.dark-mode .skeleton-text, body.dark-mode .skeleton-button { background: #333; }
body.dark-mode input, body.dark-mode textarea, body.dark-mode select { background: #2a2a2a; color: #e0e0e0; border-color: #444; }
body.dark-mode .modal-content { background: #1e1e1e; color: #e0e0e0; }
body.dark-mode .modal-header-fixed { background: #1a1a1a; border-color: #333; }
body.dark-mode .review-box { background: #2a2a2a; border-color: #444; }
body.dark-mode .qv-description { background: #2a2a2a; border-color: #444; color: #cbd5e1; }
body.dark-mode .qv-spec-item { background: #2a2a2a; border-color: #444; }
body.dark-mode .billing-summary { background: #2a2a2a; }
body.dark-mode .order-card { background: #2a2a2a; border-color: #444; }
body.dark-mode .tab-btn { color: #94a3b8; }
body.dark-mode .qv-qty-control { background: #2a2a2a; border-color: #444; }
body.dark-mode .qv-qty-btn { background: #333; color: #fff; }
body.dark-mode #qvQtyInput { background: #2a2a2a; color: #fff; border-color: #444; }
body.dark-mode .qv-trust-badges { background: #1e1e1e; border-color: #333; }
body.dark-mode .qv-trust-icon { background: #2a2a2a; color: #fff; }
body.dark-mode .product-tabs-container { background: #1e1e1e; border-color: #333; }
body.dark-mode .product-tabs-header { background: #181818; border-color: #333; }
body.dark-mode .p-tab-btn.active { background: #1e1e1e; color: var(--color-primary); }
body.dark-mode .p-desc-box { color: #cbd5e1; }
body.dark-mode .mobile-sticky-bar { background: #1e1e1e; border-color: #333; }
body.dark-mode .sticky-bar-title { color: #fff; }
body.dark-mode .sticky-btn-cart { background: #2a2a2a; color: #fff; border-color: #444; }
/* Compare Bar */
#compareBar { position:fixed; bottom:0; left:0; right:0; background:#131921; color:#fff; padding:14px 5%; display:none; align-items:center; justify-content:space-between; z-index:80; box-shadow:0 -4px 12px rgba(0,0,0,0.3); gap:16px; flex-wrap:wrap; }


.logo-trust {
  color: #0088ff !important;
  background: linear-gradient(180deg, #0099ff 10%, #004cb8 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
}
.logo-mart {
  color: #2bb41d !important;
  background: linear-gradient(180deg, #5dd416 10%, #008f28 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
}
.logo-bd {
  color: #ff6a00 !important;
  background: linear-gradient(180deg, #ffa800 10%, #ff4200 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  display: inline-block;
}

/* Admin specific overrides if on light bg */
.login-logo .logo-trust {
  color: #0056b3 !important;
  background: linear-gradient(180deg, #0066cc 10%, #003366 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.login-logo .logo-mart {
  color: #198754 !important;
  background: linear-gradient(180deg, #3db814 10%, #006622 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}
.login-logo .logo-bd {
  color: #ea580c !important;
  background: linear-gradient(180deg, #ff8c00 10%, #c93500 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}


/* --- a11y helpers (visually hidden, design unchanged) --- */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link{position:absolute;left:-9999px;top:0;z-index:9999;background:#131921;color:#fff;padding:10px 16px;border-radius:0 0 8px 0;font-weight:700;text-decoration:none}
.skip-link:focus{left:0}
a[role="button"]{cursor:pointer}

     .invoice-box { max-width: 800px; margin: auto; padding: 30px; border: 1px solid #eee; box-shadow: 0 0 10px rgba(0, 0, 0, 0.15); }
     .invoice-box table { width: 100%; line-height: inherit; text-align: left; border-collapse: collapse; }
     .invoice-box table td { padding: 5px; vertical-align: top; }
     .invoice-box table tr td:nth-child(2) { text-align: right; }
     .invoice-box table tr.top table td { padding-bottom: 20px; }
     .invoice-box table tr.top table td.title { font-size: 45px; line-height: 45px; color: #333; }
     .invoice-box table tr.information table td { padding-bottom: 40px; }
     .invoice-box table tr.heading td { background: #eee; border-bottom: 1px solid #ddd; font-weight: bold; }
     .invoice-box table tr.details td { padding-bottom: 20px; }
     .invoice-box table tr.item td { border-bottom: 1px solid #eee; }
     .invoice-box table tr.item.last td { border-bottom: none; }
     .invoice-box table tr.total td:nth-child(2) { border-top: 2px solid #eee; font-weight: bold; }
   




/* Sidebar Category Nav Styles */
.sidebar-categories ul li a { display: block; padding: 10px 12px; color: var(--color-text); text-decoration: none; font-size: 14px; font-weight: 500; border-radius: 6px; transition: var(--transition-smooth); border-left: 3px solid transparent; }
.sidebar-categories ul li a:hover { background: var(--color-bg); color: var(--color-primary-dark); }
.sidebar-categories ul li a.active { background: #fff5eb; color: var(--color-primary-dark); border-left-color: var(--color-primary); font-weight: 700; }
body.dark-mode .sidebar-categories ul li a.active { background: #2a1f11; }
@media (max-width: 768px) {
  .main-layout { flex-direction: column !important; }
  .sidebar-categories { width: 100% !important; position: static !important; max-height: none !important; border: none !important; box-shadow: none !important; padding: 0 !important; background: transparent !important; }
  #sidebarCategoryList { flex-direction: row !important; overflow-x: auto !important; padding-bottom: 8px !important; scrollbar-width: none !important; -webkit-overflow-scrolling: touch; }
  #sidebarCategoryList::-webkit-scrollbar { display: none; }
  #sidebarCategoryList li { flex-shrink: 0; }
  .sidebar-categories ul li a { border-left: none; border-bottom: 3px solid transparent; }
  .sidebar-categories ul li a.active { border-left-color: transparent; border-bottom-color: var(--color-primary); }
}

/* ========================================================
   TRUSTMART 2.0: AMAZON / ALIBABA / ROKOMARI ENHANCEMENTS
   ======================================================== */

/* Trust & Value Proposition Ribbon */
.trust-value-ribbon {
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  padding: 10px 4%;
  display: flex;
  align-items: center;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
body.dark-mode .trust-value-ribbon {
  background: var(--color-surface);
  border-color: var(--color-border);
  color: #cbd5e1;
}
.trust-ribbon-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.trust-ribbon-icon {
  font-size: 16px;
  color: var(--color-primary);
}

/* Quick Category Navigation Strip (Amazon / Alibaba / Daraz style) */
.quick-category-strip {
  display: flex;
  gap: 12px;
  padding: 14px 4%;
  background: #ffffff;
  border-bottom: 1px solid var(--color-border);
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
body.dark-mode .quick-category-strip {
  background: var(--color-surface);
  border-color: var(--color-border);
}
.quick-category-strip::-webkit-scrollbar {
  display: none;
}
.quick-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 24px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
body.dark-mode .quick-cat-item {
  background: #1e293b;
  border-color: #334155;
  color: #f1f5f9;
}
.quick-cat-item:hover, .quick-cat-item.active {
  background: var(--color-primary);
  color: #111827;
  border-color: var(--color-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(255, 153, 0, 0.25);
}
.quick-cat-icon {
  font-size: 16px;
  line-height: 1;
}

/* Multi-Vendor Store Spotlight (Alibaba Verified Suppliers style) */
.vendor-spotlight-section {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-sm);
}
body.dark-mode .vendor-spotlight-section {
  background: var(--color-surface);
}
.vendor-spotlight-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.vendor-spotlight-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--color-secondary);
  display: flex;
  align-items: center;
  gap: 8px;
}
body.dark-mode .vendor-spotlight-title {
  color: #f8fafc;
}
.vendor-store-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.vendor-store-slider::-webkit-scrollbar {
  display: none;
}
.vendor-store-card {
  flex: 0 0 240px;
  width: 240px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  transition: all 0.2s ease;
  cursor: pointer;
}
body.dark-mode .vendor-store-card {
  background: #1e293b;
  border-color: #334155;
}
.vendor-store-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--color-primary);
}
.vendor-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff9900 0%, #ea580c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.vendor-store-name {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark-mode .vendor-store-name {
  color: #f8fafc;
}
.vendor-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #0284c7;
  background: #e0f2fe;
  padding: 2px 8px;
  border-radius: 12px;
}
.vendor-product-count {
  font-size: 12px;
  color: #64748b;
}
.vendor-store-btn {
  margin-top: 6px;
  width: 100%;
  padding: 6px 12px;
  background: #ffffff;
  border: 1px solid var(--color-primary);
  color: var(--color-primary-dark);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.vendor-store-btn:hover {
  background: var(--color-primary);
  color: #111827;
}

/* Dedicated Rokomari / Amazon Book Specification Box */
.book-spec-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 20px;
  margin: 18px 0;
  box-shadow: var(--shadow-sm);
}
body.dark-mode .book-spec-card {
  background: var(--color-surface);
  border-color: var(--color-border);
}
.book-spec-header {
  font-size: 16px;
  font-weight: 800;
  color: var(--color-secondary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #f1f5f9;
  padding-bottom: 10px;
}
body.dark-mode .book-spec-header {
  color: #f8fafc;
  border-color: #334155;
}
.book-spec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.book-spec-table tr {
  border-bottom: 1px solid #f1f5f9;
}
body.dark-mode .book-spec-table tr {
  border-color: #334155;
}
.book-spec-label {
  width: 32%;
  padding: 9px 10px;
  font-weight: 700;
  color: #64748b;
  background: #f8fafc;
  white-space: nowrap;
}
body.dark-mode .book-spec-label {
  background: #1e293b;
  color: #94a3b8;
}
.book-spec-val {
  padding: 9px 12px;
  font-weight: 600;
  color: #0f172a;
}
body.dark-mode .book-spec-val {
  color: #f1f5f9;
}
.book-spec-link {
  color: #0284c7;
  text-decoration: none;
  font-weight: 700;
}
.book-spec-link:hover {
  text-decoration: underline;
}

/* Comprehensive Book Delivery Box */
.book-delivery-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 10px;
  padding: 14px 16px;
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
body.dark-mode .book-delivery-box {
  background: #052e16;
  border-color: #166534;
}
.book-delivery-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #166534;
}
body.dark-mode .book-delivery-row {
  color: #86efac;
}
.book-delivery-row strong {
  color: #14532d;
}
body.dark-mode .book-delivery-row strong {
  color: #bbf7d0;
}

/* Card Enhancements (Author & Multi-Vendor Tag) */
.card-author-line {
  font-size: 12px;
  color: #64748b;
  margin: 2px 0 6px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
body.dark-mode .card-author-line {
  color: #94a3b8;
}
.card-vendor-line {
  font-size: 11px;
  color: #0284c7;
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-cod-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  color: #15803d;
  background: #dcfce7;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
}
body.dark-mode .card-cod-badge {
  background: #14532d;
  color: #86efac;
}

/* Product Detail Back Button */
.product-back-bar {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}
.btn-product-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface, #ffffff);
  color: var(--color-text, #1e293b);
  border: 1px solid var(--color-border, #e2e8f0);
  border-radius: 24px;
  padding: 8px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
}
.btn-product-back:hover {
  border-color: var(--color-primary, #ff9900);
  color: var(--color-primary, #ff9900);
  background: #fffdf5;
  transform: translateX(-2px);
}
body.dark-mode .btn-product-back {
  background: #1e293b;
  color: #f1f5f9;
  border-color: #334155;
}
body.dark-mode .btn-product-back:hover {
  border-color: var(--color-primary, #ff9900);
  color: var(--color-primary, #ff9900);
  background: #0f172a;
}

/* ══════════════════════════════════════════════════════════════
   Additional Responsive Breakpoints
   ══════════════════════════════════════════════════════════════ */

/* Small phones (iPhone SE, Galaxy S8, etc.) */
@media (max-width: 380px) {
  .logo { font-size: 20px !important; }
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)) !important; gap: 10px !important; padding: 16px 3% !important; }
  .product-grid .card { font-size: 13px; }
  .product-grid .card h3 { font-size: 13px; }
  .product-grid .card .price { font-size: 14px; }
  header { padding: 10px 3% !important; }
  .header-actions { gap: 8px; }
  .header-actions button, .header-actions a { font-size: 12px; }
  nav ul li a { font-size: 12px; padding: 8px 10px; }
  .search-container input { font-size: 14px; }
  .modal-content { width: 98vw !important; margin: 4px auto; }
  .checkout-wrapper { width: 98% !important; }
  .qv-layout { padding: 12px !important; }
  .qv-title { font-size: 18px !important; }
  .qv-price { font-size: 20px !important; }
  .tab-btn { font-size: 13px; padding: 10px 6px; }
  #mobileStickyBar { padding: 10px 3%; }
  #mobileStickyBar button { font-size: 13px; padding: 10px 14px; }
}

/* Tablets (landscape & portrait) */
@media (min-width: 769px) and (max-width: 1024px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 18px; padding: 24px 3%; }
  .sidebar-categories { width: 200px; min-width: 200px; }
  .qv-layout { grid-template-columns: 1fr 1fr; gap: 20px; }
  .checkout-wrapper { width: 92%; }
  .modal-body-flex { flex-direction: row; gap: 20px; }
  .chk-right-col { width: 320px; }
  header { padding: 12px 3%; }
  .search-container { max-width: 400px; }
  .dashboard-layout { flex-direction: row; }
  .dashboard-sidebar { width: 220px; min-width: 220px; }
}

/* Large desktops / ultrawide */
@media (min-width: 1441px) {
  .product-grid { max-width: 1600px; margin: 0 auto; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
  .qv-layout { max-width: 1400px; margin: 0 auto; }
  header { padding: 14px 8%; }
  .search-container { max-width: 700px; }
  footer .footer-grid { max-width: 1400px; margin: 0 auto; }
  .checkout-wrapper { max-width: 1200px; }
  .sidebar-categories { width: 280px; }
}

/* ══════════════════════════════════════════════════════════════
   UX Enhancements — Animations, Hover, Lightbox, Offline
   ══════════════════════════════════════════════════════════════ */

/* B1: Product card hover lift effect */
.product-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.product-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}
@media (max-width: 768px) {
  .product-card:hover { transform: none; box-shadow: none; }
}

/* B2: Smooth fade-in for product cards */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}
.product-card { animation: fadeInUp 0.35s ease both; }
.product-card:nth-child(2) { animation-delay: 0.04s; }
.product-card:nth-child(3) { animation-delay: 0.08s; }
.product-card:nth-child(4) { animation-delay: 0.12s; }
.product-card:nth-child(5) { animation-delay: 0.16s; }
.product-card:nth-child(6) { animation-delay: 0.20s; }

/* B3: Offline network banner */
.offline-banner {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 99999;
  background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff;
  text-align: center; padding: 12px 20px; font-weight: 700; font-size: 14px;
  font-family: 'Hind Siliguri', sans-serif;
  transform: translateY(100%); transition: transform 0.35s ease;
  box-shadow: 0 -4px 16px rgba(0,0,0,0.15);
}
.offline-banner.show { transform: translateY(0); }

/* C1: Product page entrance animation */
@keyframes productSlideIn {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
#productPageContainer.animate-in .qv-layout {
  animation: productSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* C2: Image switch fade transition */
.qv-main-img-wrap img {
  transition: opacity 0.25s ease;
}
.qv-main-img-wrap img.switching {
  opacity: 0.3;
}

/* C2: Enhanced thumbnails */
.qv-thumb {
  transition: all 0.2s ease;
}
.qv-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* C3: Fullscreen Image Lightbox */
.tm-lightbox {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(0, 0, 0, 0.94);
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-out;
  animation: lbFadeIn 0.25s ease;
}
@keyframes lbFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.tm-lightbox img {
  max-width: 92vw; max-height: 90vh;
  object-fit: contain; border-radius: 8px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  animation: lbZoomIn 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes lbZoomIn {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.tm-lightbox-close {
  position: absolute; top: 16px; right: 20px;
  color: #fff; font-size: 36px; cursor: pointer;
  background: rgba(255,255,255,0.1); border-radius: 50%;
  width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
  border: none;
}
.tm-lightbox-close:hover { background: rgba(255,255,255,0.25); }

.tm-lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #fff; font-size: 28px; cursor: pointer;
  background: rgba(255,255,255,0.12); border-radius: 50%;
  width: 52px; height: 52px; display: flex; align-items: center; justify-content: center;
  transition: background 0.2s; border: none;
}
.tm-lightbox-nav:hover { background: rgba(255,255,255,0.3); }
.tm-lightbox-prev { left: 16px; }
.tm-lightbox-next { right: 16px; }

.tm-lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 600;
  background: rgba(0,0,0,0.4); padding: 6px 16px; border-radius: 20px;
}

@media (max-width: 768px) {
  .tm-lightbox-nav { width: 40px; height: 40px; font-size: 22px; }
  .tm-lightbox-prev { left: 8px; }
  .tm-lightbox-next { right: 8px; }
}

/* Dark mode adjustments for new elements */
body.dark-mode .offline-banner {
  background: linear-gradient(135deg, #b91c1c, #991b1b);
}
body.dark-mode .tm-lightbox {
  background: rgba(0, 0, 0, 0.97);
}
/* ==============================================================================
   AMAZON & ALIBABA STYLE MARKETPLACE HOMEPAGE ENHANCEMENTS
   ============================================================================== */
.amazon-quad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 32px;
}
@media (max-width: 1100px) {
  .amazon-quad-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 600px) {
  .amazon-quad-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}
.amazon-quad-card {
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.amazon-quad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}
.amazon-quad-title {
  font-size: 17px;
  font-weight: 800;
  color: #0f1111;
  margin: 0 0 16px 0;
  line-height: 1.3;
}
.quad-2x2-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 16px;
}
.quad-sub-item {
  display: flex;
  flex-direction: column;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.quad-sub-img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f8fafc;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 6px;
  border: 1px solid #f1f5f9;
}
.quad-sub-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform 0.3s ease;
}
.quad-sub-item:hover .quad-sub-img {
  transform: scale(1.08);
}
.quad-sub-label {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.amazon-quad-link {
  font-size: 13px;
  font-weight: 700;
  color: #007185;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.amazon-quad-link:hover {
  color: #c45500;
  text-decoration: underline;
}

/* Bundle Multi-Book Preview on Product Card */
.bundle-thumbs-strip {
  transition: background-color 0.2s ease;
}
.bundle-thumbs-strip:hover {
  background: #ecfdf5 !important;
}
.bundle-thumbs-strip::-webkit-scrollbar {
  height: 4px;
}
.bundle-thumbs-strip::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}
.bundle-thumbs-strip::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}
.bundle-card-mini-thumb {
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.bundle-card-mini-thumb:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
