/* ─── Store Layout ────────────────────────────────────────────────── */

/* Hide old Weebly sidebar/content ONLY on main store browse page */
.cvbs-store-browse #wsite-com-store .wsite-com-sidebar,
.cvbs-store-browse #wsite-com-store .wsite-com-content-with-sidebar,
.cvbs-store-browse #wsite-com-store-inner { display: none; }

.cvbs-store-layout {
  display: flex;
  gap: 0;
  max-width: 1200px;
  margin: 0 auto;
  min-height: 60vh;
}

/* ─── Sidebar ────────────────────────────────────────────────────── */

.cvbs-sidebar {
  width: 240px;
  min-width: 240px;
  background: #f9f7f4;
  border-right: 1px solid #e5e0d8;
  padding: 16px 0;
  align-self: flex-start;
  position: sticky;
  top: 60px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
}

.cvbs-sidebar h3 {
  font-family: 'Lato', sans-serif;
  font-size: 0.7em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #999;
  padding: 0 16px 8px;
  margin: 0;
}

/* Remove all default list styling — force override Weebly */
.cvbs-sb-list,
.cvbs-sb-list ul,
.cvbs-sb-list li,
.cvbs-sb-subs,
.cvbs-sb-subs li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  background-image: none !important;
}

/* Ensure sub-categories are hidden by default */
.cvbs-sb-subs {
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  transition: max-height 0.3s ease, opacity 0.2s ease !important;
}

/* Show on hover of parent li */
.cvbs-sb-item:hover > .cvbs-sb-subs {
  max-height: 300px !important;
  opacity: 1 !important;
}

/* Keep open when category is selected */
.cvbs-sb-item.open > .cvbs-sb-subs {
  max-height: 300px !important;
  opacity: 1 !important;
}

.cvbs-sb-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 16px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  font-family: 'Lato', sans-serif;
  font-size: 0.93em;
  font-weight: 600;
  color: #555;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.cvbs-sb-btn:hover {
  background: #f0ece6;
  color: #aa5922;
}

.cvbs-sb-btn.active {
  background: #fff8f0;
  color: #aa5922;
  border-left-color: #f0a030;
}

.cvbs-sb-arrow {
  font-size: 0.6em;
  color: #ccc;
  transition: transform 0.25s, color 0.2s;
  margin-left: 6px;
}

.cvbs-sb-btn:hover .cvbs-sb-arrow,
.cvbs-sb-btn.active .cvbs-sb-arrow {
  color: #aa5922;
}

.cvbs-sb-btn.active .cvbs-sb-arrow {
  transform: rotate(180deg);
}

/* ─── Sub-category Links ─────────────────────────────────────────── */

.cvbs-sb-sub {
  display: block;
  padding: 7px 16px 7px 32px;
  color: #777;
  text-decoration: none;
  font-size: 0.87em;
  font-family: 'Lato', sans-serif;
  cursor: pointer;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  width: 100%;
  text-align: left;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}

.cvbs-sb-sub:hover {
  background: #ede8e0;
  color: #aa5922;
}

.cvbs-sb-sub.active {
  color: #aa5922;
  font-weight: 600;
  border-left-color: #f0a030;
  background: #fff8f0;
}

/* ─── Main Content Area ──────────────────────────────────────────── */

.cvbs-store-main {
  flex: 1;
  padding: 20px 28px 40px;
  min-width: 0;
}

.cvbs-store-title {
  font-family: 'Droid Serif', Georgia, serif;
  font-size: 1.5em;
  color: #aa5922;
  margin: 0 0 4px;
}

.cvbs-store-breadcrumb {
  font-size: 0.85em;
  color: #999;
  margin-bottom: 20px;
}

.cvbs-store-breadcrumb a {
  color: #999;
  text-decoration: none;
}

.cvbs-store-breadcrumb a:hover {
  color: #aa5922;
}

/* Welcome state */
.cvbs-store-welcome {
  text-align: center;
  padding: 80px 20px;
  color: #999;
}

.cvbs-store-welcome h2 {
  font-family: 'Droid Serif', Georgia, serif;
  color: #aa5922;
  font-size: 1.5em;
  margin: 0 0 10px;
}

.cvbs-store-welcome p {
  font-size: 1em;
  max-width: 400px;
  margin: 0 auto;
}

/* Loading */
.cvbs-loading {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.cvbs-loading::after {
  content: '';
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #ddd;
  border-top-color: #f0a030;
  border-radius: 50%;
  animation: cvbs-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-left: 10px;
}

@keyframes cvbs-spin {
  to { transform: rotate(360deg); }
}

/* ─── Product Grid ───────────────────────────────────────────────── */

.cvbs-product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 16px;
}

.cvbs-prod-card {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
}

.cvbs-prod-card:hover {
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  transform: translateY(-2px);
  text-decoration: none;
  color: inherit;
}

.cvbs-prod-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  background: #f5f5f5;
  display: block;
}

.cvbs-prod-info {
  padding: 10px 12px 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.cvbs-prod-name {
  font-family: 'Lato', sans-serif;
  font-size: 0.9em;
  font-weight: 600;
  color: #aa5922;
  margin: 0 0 6px;
  line-height: 1.3;
}

.cvbs-prod-price {
  font-size: 0.85em;
  color: #333;
  margin-top: auto;
}

/* ─── Product Detail (inline) ────────────────────────────────────── */

.cvbs-product-detail {
  background: #fff;
}

.cvbs-detail-back {
  display: inline-block;
  padding: 8px 0;
  color: #aa5922;
  text-decoration: none;
  font-size: 0.9em;
  margin-bottom: 16px;
  cursor: pointer;
}

.cvbs-detail-back:hover {
  text-decoration: underline;
}

.cvbs-detail-layout {
  display: flex;
  gap: 30px;
}

.cvbs-detail-image {
  flex: 0 0 45%;
  max-width: 45%;
}

.cvbs-detail-image img {
  width: 100%;
  border-radius: 8px;
  border: 1px solid #eee;
}

.cvbs-detail-info {
  flex: 1;
}

.cvbs-detail-info h1 {
  font-family: 'Droid Serif', Georgia, serif;
  font-size: 1.4em;
  color: #333;
  margin: 0 0 10px;
}

.cvbs-detail-price {
  font-size: 1.2em;
  font-weight: 700;
  color: #aa5922;
  margin-bottom: 16px;
}

.cvbs-detail-desc {
  font-size: 0.95em;
  color: #555;
  line-height: 1.6;
  margin-bottom: 20px;
}

/* ─── Style Weebly sidebar on category/product pages ─────────────── */

.wsite-com-sidebar {
  background: #f9f7f4;
  border-right: 1px solid #e5e0d8;
  padding-top: 10px;
}

.wsite-com-sidebar .wsite-com-link {
  display: block;
  padding: 8px 16px;
  color: #444;
  text-decoration: none;
  font-size: 0.93em;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
}

.wsite-com-sidebar .wsite-com-link:hover {
  background: #f0ece6;
  color: #aa5922;
}

.wsite-com-sidebar .wsite-link-selected {
  background: #fff8f0;
  color: #aa5922 !important;
  border-left-color: #f0a030;
  font-weight: 600;
}

.wsite-com-sidebar .wsite-com-link-text {
  color: inherit;
}

.wsite-com-sidebar ul ul .wsite-com-link {
  padding-left: 32px;
  font-size: 0.88em;
}

/* ─── Improve category page product grids ────────────────────────── */

.wsite-com-category-product-group,
.wsite-com-category-product-featured-group {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)) !important;
  gap: 16px !important;
  float: none !important;
}

.wsite-com-category-product-group .wsite-com-column,
.wsite-com-category-product-featured-group .wsite-com-column {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
}

.wsite-com-category-product-wrap,
.wsite-com-category-product-featured-wrap {
  border: 1px solid #eee;
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.15s;
  background: #fff;
  height: 100%;
}

.wsite-com-category-product-wrap:hover,
.wsite-com-category-product-featured-wrap:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.wsite-com-category-product-name {
  padding: 10px 12px 4px !important;
  font-size: 0.93em !important;
  font-weight: 600 !important;
  color: #aa5922 !important;
}

.wsite-com-product-price {
  padding: 0 12px 12px !important;
}

/* ─── Responsive ─────────────────────────────────────────────────── */

@media screen and (max-width: 900px) {
  .cvbs-store-layout {
    flex-direction: column;
  }

  .cvbs-sidebar {
    width: 100%;
    min-width: 100%;
    position: static;
    max-height: none;
    border-right: none;
    border-bottom: 1px solid #e5e0d8;
    padding: 10px 0;
  }

  .cvbs-sb-list {
    display: flex !important;
    flex-wrap: wrap !important;
    padding: 4px 12px !important;
    gap: 4px !important;
  }

  .cvbs-sb-item {
    position: relative;
  }

  .cvbs-sb-btn {
    padding: 8px 14px;
    border-left: none;
    border-radius: 20px;
    font-size: 0.85em;
    white-space: nowrap;
    background: #ede8e0;
  }

  .cvbs-sb-btn:hover,
  .cvbs-sb-btn.active {
    background: #fff8f0;
    border-left: none;
  }

  .cvbs-sb-arrow { display: none; }

  .cvbs-sb-subs {
    position: absolute;
    z-index: 100;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    min-width: 180px;
    top: 100%;
    left: 0;
  }

  .cvbs-sb-sub {
    padding: 8px 16px;
    border-left: none;
  }

  .cvbs-sidebar h3 { display: none; }

  .cvbs-store-main { padding: 16px; }

  .cvbs-product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .cvbs-detail-layout { flex-direction: column; }
  .cvbs-detail-image { flex: none; max-width: 100%; }
}

@media screen and (max-width: 480px) {
  .cvbs-product-grid { grid-template-columns: 1fr; }
}
