@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Poppins:wght@400;500;600;700&display=swap');

/* =========================================
   1. ROOT VARIABLES & BASE
   ========================================= */
:root {
  --bg: #ffffff;
  --surface: #fdf5f5;
  --ink: #2c3154;
  --dim: #666666;
  --border: #fae8e8;
  --accent: #ef4b3c;
  --on-accent: #ffffff;

  --vb-pink: #fdf5f5;
  --vb-red: #ef4b3c;
  --vb-red-hover: #d63e30;
  --vb-dark: #2c3154;
  --vb-text: #666666;
  
  --vb-font-head: 'Poppins', system-ui, sans-serif;
  --vb-font-body: 'Inter', system-ui, sans-serif;
  --vb-container: 1200px;
}

body {
  font-family: var(--vb-font-body);
  background: var(--bg);
  color: var(--vb-text);
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .vb-title {
  font-family: var(--vb-font-head);
  color: var(--vb-dark);
  font-weight: 600;
  margin-top: 0;
}

a { text-decoration: none; color: inherit; }

.vb-container { 
  max-width: var(--vb-container); 
  margin: 0 auto; 
  padding: 0 20px; 
  width: 100%;
  box-sizing: border-box;
}

/* =========================================
   2. BUTTONS
   ========================================= */
.vb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-family: var(--vb-font-head);
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.vb-btn--outline { background: transparent; border-color: var(--vb-dark); color: var(--vb-dark); }
.vb-btn--outline:hover { background: var(--vb-dark); color: #fff; }
.vb-btn--solid { background: var(--vb-red); border-color: var(--vb-red); color: #fff; }
.vb-btn--solid:hover { background: var(--vb-red-hover); }

/* =========================================
   3. HEADER & MOBILE NAVIGATION
   ========================================= */
.vb-topbar {
  background: #2c3154;
  color: #ffffff;
  padding: 8px 0;
  font-size: 12px;
  font-family: var(--vb-font-body);
}
.vb-topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.vb-topbar__socials { display: flex; gap: 16px; }
.vb-topbar__socials a { color: #ffffff; opacity: 0.8; transition: opacity 0.2s; }
.vb-topbar__socials a:hover { opacity: 1; }

.vb-main-header {
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.vb-main-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.vb-logo-left {
  flex: 1;
  display: flex;
  justify-content: flex-start;
}
.vb-logo-placeholder {
  width: 50px;
  height: 50px;
  background: #cccccc;
  border-radius: 50%;
}

.vb-nav {
  flex: 2;
  display: flex;
  justify-content: center;
  gap: 24px;
  font-family: var(--vb-font-head);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--vb-dark);
}
.vb-nav a { transition: color 0.2s; text-decoration: none; }
.vb-nav a:hover { color: var(--vb-red); }
.vb-nav a.is-active { color: var(--vb-red); }

.vb-actions {
  flex: 1;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 20px;
  color: var(--vb-dark);
}
.vb-actions a, .vb-actions button {
  position: relative;
  transition: color 0.2s;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  color: inherit;
}
.vb-actions a:hover, .vb-actions button:hover { color: var(--vb-red); }
.vb-actions svg { width: 20px; height: 20px; }

.vb-cart-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  background: var(--vb-red);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile Drawer */
.vb-mobile-toggle { display: none; }
.vb-mobile-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s;
}
.vb-mobile-overlay.is-open { opacity: 1; visibility: visible; }

.vb-mobile-drawer {
  position: fixed; top: 0; left: -320px; width: 300px; height: 100vh;
  background: #fff; z-index: 1000; transition: left 0.3s ease;
  display: flex; flex-direction: column; box-shadow: 2px 0 15px rgba(0,0,0,0.1);
}
.vb-mobile-drawer.is-open { left: 0; }
.vb-mobile-drawer__header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px; border-bottom: 1px solid var(--border);
}
.vb-mobile-drawer__title { font-family: var(--vb-font-head); font-weight: 700; font-size: 18px; color: var(--vb-dark); }
.vb-mobile-drawer__close { background: none; border: none; font-size: 28px; color: var(--vb-dark); cursor: pointer; line-height: 1; }
.vb-mobile-drawer__body { padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 20px; }
.vb-mobile-link {
  font-family: var(--vb-font-head); font-weight: 600; font-size: 15px;
  color: var(--vb-dark); text-decoration: none; text-transform: uppercase;
  letter-spacing: 0.05em;
}
.vb-mobile-link:hover { color: var(--vb-red); }

/* =========================================
   4. PRODUCT GRID & CARDS
   ========================================= */
.vb-book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 30px;
}
.vb-book-card {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.03);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.vb-book-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}
.vb-book-card__img-wrap {
  position: relative;
  aspect-ratio: 2/3;
  margin-bottom: 20px;
  overflow: hidden;
  border-radius: 4px;
  background: #eee;
}
.vb-book-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}
.vb-book-card:hover .vb-book-card__img-wrap img { transform: scale(1.03); }

.vb-book-card__add {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: var(--vb-red);
  color: #fff;
  border: none;
  padding: 14px;
  font-family: var(--vb-font-head);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  text-transform: uppercase;
}
.vb-book-card:hover .vb-book-card__add { transform: translateY(0); }

.vb-book-card__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--vb-dark);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
  line-height: 1.4;
  text-align: left;
}
.vb-book-card__author {
  font-size: 13px;
  color: var(--vb-text);
  margin-bottom: 12px;
  text-align: left;
}
.vb-book-card__price {
  font-size: 16px;
  font-weight: 600;
  color: var(--vb-red);
  margin-top: auto;
  text-align: left;
}

/* =========================================
   5. HERO & CATEGORIES
   ========================================= */
.vb-hero-wrapper { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 60px; 
  align-items: center; 
  padding: 80px 20px; 
}
.vb-hero-title { font-size: 52px; line-height: 1.1; margin-bottom: 24px; color: var(--vb-dark); font-weight: 700; }
.vb-hero-title em { font-style: italic; color: var(--vb-red); font-weight: 400; }
.vb-hero-sub { font-size: 16px; line-height: 1.6; margin-bottom: 32px; color: var(--vb-text); max-width: 400px; }
.vb-hero-image img { max-height: 450px; width: 100%; object-fit: cover; box-shadow: 20px 20px 40px rgba(0,0,0,0.1); border-radius: 8px; }

.vb-cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.vb-cat-card { 
  text-decoration: none; display: flex; flex-direction: column; 
  padding: 40px 30px; border-radius: 8px; position: relative; 
  min-height: 200px; justify-content: space-between; transition: transform 0.2s;
}
.vb-cat-card:hover { transform: translateY(-5px); }
.vb-cat-card__num { font-size: 14px; font-weight: 600; color: var(--vb-dark); opacity: 0.6; }
.vb-cat-card h3 { font-size: 24px; color: var(--vb-dark); margin: 0 0 4px; }
.vb-cat-card p { font-size: 14px; margin: 0; color: var(--vb-dark); opacity: 0.8; }
.vb-cat-card__icon { position: absolute; bottom: 30px; right: 30px; color: var(--vb-dark); }

/* =========================================
   6. COLLECTION PAGE LAYOUT
   ========================================= */
.vb-collection-layout { 
  display: grid; 
  grid-template-columns: 250px 1fr; 
  gap: 50px; 
  align-items: start; 
}

/* =========================================
   7. CART PAGE LAYOUT
   ========================================= */
.vb-cart-layout { 
    display: grid; 
    grid-template-columns: 1fr 340px; 
    gap: 40px; 
    align-items: start; 
}
.vb-cart-box { 
    background: #fff; 
    border: 1px solid var(--border); 
    border-radius: 8px; 
    padding: 10px 20px; 
}
.vb-cart-item {
    display: grid;
    grid-template-columns: 80px 1fr auto auto auto;
    align-items: center;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}
.vb-cart-item:last-child { border-bottom: none; }
.vb-cart-item__img img { 
    width: 80px; height: 100px; object-fit: cover; border-radius: 4px; display: block; 
}
.vb-cart-item__info { display: flex; flex-direction: column; gap: 4px; }
.vb-cart-item__title { 
    font-size: 16px; font-weight: 600; color: var(--vb-dark); line-height: 1.3; 
}
.vb-cart-item__price { font-size: 14px; color: var(--vb-red); font-weight: 600; }

.vb-cart-item__qty .vb-pdp-qty { 
    border: 1px solid var(--border); border-radius: 4px; background: #fff; overflow: hidden; display: flex; align-items: center; 
}
.vb-cart-item__qty .vb-pdp-qty button { 
    width: 32px; height: 40px; background: #f9f9f9; border: none; cursor: pointer; font-size: 16px; font-weight: 600; color: var(--vb-dark); 
}
.vb-cart-item__qty .vb-pdp-qty input { 
    width: 40px; height: 40px; text-align: center; border: none; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 14px; font-weight: 600; color: var(--vb-dark); outline: none; 
}
.vb-cart-item__total { 
    width: 80px; text-align: right; font-weight: 600; font-size: 16px; color: var(--vb-dark); 
}
.vb-cart-item__remove button { 
    background: none; border: none; font-size: 24px; color: #999; cursor: pointer; padding: 0 10px; transition: color 0.2s; 
}
.vb-cart-item__remove button:hover { color: var(--vb-red); }

.vb-cart-summary { 
    background: var(--vb-pink); border-radius: 8px; padding: 30px; position: sticky; top: 100px; 
}
.vb-cart-summary h2 { font-size: 20px; margin-bottom: 24px; color: var(--vb-dark); }
.vb-cart-summary__row { 
    display: flex; justify-content: space-between; margin-bottom: 16px; font-size: 15px; color: var(--vb-text); 
}
.vb-cart-summary__row span:last-child { font-weight: 600; color: var(--vb-dark); }
.vb-cart-summary__total { 
    display: flex; justify-content: space-between; border-top: 1px solid rgba(0,0,0,0.1); padding-top: 20px; margin-bottom: 24px; font-weight: 600; font-size: 18px; color: var(--vb-dark); 
}
.vb-cart-summary__total span:last-child { color: var(--vb-red); font-size: 22px; }

/* =========================================
   8. FOOTER LAYOUT
   ========================================= */
.vb-footer-grid { 
  display: grid; 
  grid-template-columns: 2fr 1fr 1fr; 
  gap: 40px; 
}

/* =========================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================= */

/* Tablet & Small Desktop (under 900px) */
@media (max-width: 900px) {
    /* Header */
    .vb-nav { display: none; }
    .vb-mobile-toggle { display: block; }
    .vb-hide-mobile { display: none !important; }

    /* Grids */
    .vb-book-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .vb-cat-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* Layouts */
    .vb-hero-wrapper { gap: 40px; padding: 60px 20px; }
    .vb-hero-title { font-size: 40px; }
    .vb-collection-layout { grid-template-columns: 1fr !important; gap: 40px; }
    .vb-cart-layout { grid-template-columns: 1fr !important; gap: 40px; }
    .vb-cart-summary { position: static; }
}

/* Mobile (under 768px) */
@media (max-width: 768px) {
    .vb-hero-wrapper { 
        grid-template-columns: 1fr !important; 
        text-align: center; 
        gap: 30px; 
    }
    .vb-hero-sub { margin: 0 auto 24px auto; }
    .vb-hero-image img { max-height: 300px; box-shadow: 0 10px 20px rgba(0,0,0,0.1); }
    
    .vb-cat-grid { grid-template-columns: 1fr !important; gap: 16px; }
    .vb-footer-grid { grid-template-columns: 1fr !important; text-align: center; gap: 40px; }
}

/* Small Mobile (under 600px) */
@media (max-width: 600px) {
    .vb-cart-item {
        grid-template-columns: 80px 1fr auto;
        grid-template-areas:
            "img info remove"
            "img qty total";
        row-gap: 10px;
    }
    .vb-cart-item__img { grid-area: img; }
    .vb-cart-item__info { grid-area: info; }
    .vb-cart-item__qty { grid-area: qty; }
    .vb-cart-item__total { grid-area: total; width: auto; text-align: right; }
    .vb-cart-item__remove { grid-area: remove; text-align: right; }
    .vb-cart-item__remove button { padding: 0; }
}

/* Extra Small Mobile (under 480px) */
@media (max-width: 480px) {
    .vb-book-grid { grid-template-columns: 1fr !important; }
    .vb-hero-title { font-size: 32px; }
}