/* ============================================
   CRACK NCA EXAMS — Brand Theme v2
   ============================================ */

:root {
  --brand-red:      #CC0000;
  --brand-red-dark: #AA0000;
  --admin-law:      #D97706;
  --const-law:      #D80621;
  --crim-law:       #8B0000;
  --contracts:      #047857;
  --foundations:    #166534;
  --prof-resp:      #1D4ED8;
}

/* -- Links -- */
a { color: var(--brand-red); }
a:hover, a:focus { color: var(--brand-red-dark); }

/* -- Prices & badges -- */
.woocommerce-Price-amount,
.woocommerce span.onsale { color: var(--brand-red); }
.woocommerce span.onsale { background: var(--brand-red); color: #fff; }
.star-rating span::before { color: var(--brand-red); }

/* -- Buttons -- */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit {
  background: var(--brand-red);
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  transition: background .2s;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  background: var(--brand-red-dark) !important;
  color: #fff !important;
}

/* -- Footer -- */
.site-footer { background: #1a1a1a; color: #ccc; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: var(--brand-red); }

/* ============================================
   PRODUCT CARDS
   ============================================ */
.woocommerce ul.products li.product {
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow .25s, transform .2s;
  padding-bottom: 16px;
}
.woocommerce ul.products li.product:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  transform: translateY(-3px);
}
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 15px;
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.35;
  padding: 12px 16px 4px;
}
.woocommerce ul.products li.product .price {
  padding: 0 16px;
  font-weight: 700;
  color: var(--brand-red);
}
.woocommerce ul.products li.product a img {
  border-radius: 8px 8px 0 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

/* ============================================
   SUBJECT CATEGORY HEADERS
   ============================================ */
body.term-admin-law .woocommerce-products-header {
  background: linear-gradient(135deg, #D97706, #F59E0B);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-admin-law .woocommerce-products-header__title { color: #fff !important; }

body.term-consti-law .woocommerce-products-header {
  background: linear-gradient(135deg, #D80621, #FF4444);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-consti-law .woocommerce-products-header__title { color: #fff !important; }

body.term-crim-law .woocommerce-products-header {
  background: linear-gradient(135deg, #8B0000, #B91C1C);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-crim-law .woocommerce-products-header__title { color: #fff !important; }

body.term-contracts .woocommerce-products-header {
  background: linear-gradient(135deg, #047857, #059669);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-contracts .woocommerce-products-header__title { color: #fff !important; }

body.term-foundations-2 .woocommerce-products-header,
body.term-foundations .woocommerce-products-header {
  background: linear-gradient(135deg, #166534, #15803D);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-foundations-2 .woocommerce-products-header__title,
body.term-foundations .woocommerce-products-header__title { color: #fff !important; }

body.term-professional-responsibility .woocommerce-products-header {
  background: linear-gradient(135deg, #1D4ED8, #2563EB);
  padding: 40px; border-radius: 12px; margin-bottom: 32px;
}
body.term-professional-responsibility .woocommerce-products-header__title { color: #fff !important; }

/* ============================================
   HOMEPAGE
   ============================================ */
/* Hide "Home" page title */
.home .entry-title,
.home h1.entry-title { display: none !important; }

/* Full-width sections */
.home .type-page .entry-content { padding: 0 !important; margin: 0 !important; }
.home article.type-page { margin: 0 !important; padding: 0 !important; }
.home .entry-content > * {
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  max-width: 100vw !important;
  width: 100vw !important;
  box-sizing: border-box;
}

/* Hero headline italic underline */
.hero-headline em {
  font-style: normal;
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.5);
  text-underline-offset: 5px;
}

/* Subject card hover */
.subject-card {
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.subject-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

/* ============================================
   NAVIGATION — compact single row
   ============================================ */
@media (min-width: 768px) {
  .main-navigation ul.nav-menu,
  .main-navigation ul.menu {
    display: flex !important;
    flex-wrap: nowrap !important;
  }
  .main-navigation ul li a {
    font-size: 13px !important;
    padding: 0.5em 9px !important;
    white-space: nowrap;
  }
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3 { letter-spacing: -.02em; }
.woocommerce-result-count { color: #888; font-size: 14px; }

/* ---- Remove white gap between nav and homepage hero ---- */
.home .site-main { padding-top: 0 !important; }
.home .page-content,
.home .entry-content { padding-top: 0 !important; margin-top: 0 !important; }
.home .hentry { margin: 0 !important; }
.home .content-area { padding-top: 0 !important; }
/* Storefront theme specific */
.home .storefront-full-width-content .entry-content,
.home #content.site-content { padding-top: 0 !important; }
/* Fix gap between header and hero on homepage */
.home #masthead { margin-bottom: 0 !important; }


/* ── Nav text — dark on white header (matches Shopify) ── */
.main-navigation ul.nav-menu > li > a,
.storefront-primary-navigation .main-navigation a,
#site-navigation a,
.main-navigation a { color: #1a1a1a !important; }
.main-navigation ul.nav-menu > li > a:hover,
.main-navigation ul.nav-menu > li.current-menu-item > a { color: #CC0000 !important; text-decoration: underline; }

/* ── Hide page title on home ── */
.home .entry-title { display: none !important; }

/* ── Full-width hero image ── */
.home .entry-content .wp-block-image.alignfull img,
.home .entry-content .wp-block-image.alignfull { width: 100vw !important; max-width: 100vw !important; margin-left: calc(-50vw + 50%) !important; }

/* ── Remove gap above hero ── */
.home .site-main { padding-top: 0 !important; }
.home .hentry { margin-top: 0 !important; }
.home .entry-content { padding-top: 0 !important; }

/* ── Media-text blocks full width ── */
.home .wp-block-media-text.alignwide { max-width: 100% !important; }


/* ══════════════════════════════════════════════════════
   SHOP & CATEGORY PAGES — Match Shopify Layout
   ══════════════════════════════════════════════════════ */

/* 4-column product grid on shop/category pages */
.woocommerce ul.products,
.woocommerce-page ul.products {
  display: grid !important;
  grid-template-columns: repeat(4, 1fr) !important;
  gap: 24px !important;
  list-style: none !important;
  padding: 0 !important;
  margin: 0 0 32px !important;
}
@media (max-width: 900px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 600px) {
  .woocommerce ul.products,
  .woocommerce-page ul.products { grid-template-columns: 1fr !important; }
}

/* Product card styling — clean white card with border */
.woocommerce ul.products li.product {
  background: #fff !important;
  border: 1px solid #e5e5e5 !important;
  border-radius: 8px !important;
  overflow: hidden !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  transition: box-shadow 0.2s ease !important;
  width: auto !important;
  float: none !important;
}
.woocommerce ul.products li.product:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1) !important;
}

/* Product thumbnail — square aspect ratio */
.woocommerce ul.products li.product a img {
  width: 100% !important;
  height: 200px !important;
  object-fit: cover !important;
  display: block !important;
  border-bottom: 1px solid #f0f0f0 !important;
}

/* Product title */
.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 12px 14px 4px !important;
  line-height: 1.3 !important;
  color: #1a1a1a !important;
  flex-grow: 1 !important;
}

/* Price in red like Shopify */
.woocommerce ul.products li.product .price {
  color: #CC0000 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  padding: 4px 14px 10px !important;
}

/* Add to cart button — full width, red */
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .add_to_cart_button {
  display: block !important;
  width: calc(100% - 28px) !important;
  margin: 0 14px 14px !important;
  background: #fff !important;
  color: #1a1a1a !important;
  border: 1px solid #1a1a1a !important;
  border-radius: 4px !important;
  text-align: center !important;
  padding: 10px !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  transition: background 0.2s, color 0.2s !important;
}
.woocommerce ul.products li.product .button:hover,
.woocommerce ul.products li.product .add_to_cart_button:hover {
  background: #1a1a1a !important;
  color: #fff !important;
}

/* Shop page header */
.woocommerce-products-header__title,
.woocommerce h1.page-title {
  font-size: 28px !important;
  font-weight: 700 !important;
  margin-bottom: 24px !important;
}

/* Breadcrumbs */
.woocommerce .woocommerce-breadcrumb {
  font-size: 13px !important;
  color: #666 !important;
  margin-bottom: 20px !important;
}
.woocommerce .woocommerce-breadcrumb a { color: #666 !important; }

/* Results count + sort toolbar */
.woocommerce-result-count { font-size: 13px !important; color: #666 !important; }
.woocommerce-ordering select {
  border: 1px solid #e0e0e0 !important;
  border-radius: 4px !important;
  padding: 6px 10px !important;
  font-size: 13px !important;
}

/* Category page accent banners (per subject) */
body.term-admin-law .woocommerce-products-header { background: linear-gradient(135deg, #D97706, #F59E0B); color: #fff; padding: 32px; margin-bottom: 24px; }
body.term-consti-law .woocommerce-products-header { background: linear-gradient(135deg, #D80621, #FF4444); color: #fff; padding: 32px; margin-bottom: 24px; }
body.term-crim-law .woocommerce-products-header { background: linear-gradient(135deg, #8B0000, #B91C1C); color: #fff; padding: 32px; margin-bottom: 24px; }
body.term-contracts .woocommerce-products-header { background: linear-gradient(135deg, #047857, #059669); color: #fff; padding: 32px; margin-bottom: 24px; }
body.term-foundations-2 .woocommerce-products-header { background: linear-gradient(135deg, #166534, #15803D); color: #fff; padding: 32px; margin-bottom: 24px; }
body.term-professional-responsibility .woocommerce-products-header { background: linear-gradient(135deg, #1D4ED8, #2563EB); color: #fff; padding: 32px; margin-bottom: 24px; }
/* category banner hidden */
.term-crackncaexams-studymaterials .woocommerce-products-header,
.term-crackncaexams-courses-workshops .woocommerce-products-header {
  display: none !important;
}




/* ── Product card: edge-to-edge image ── */
.woocommerce ul.products li.product {
  overflow: hidden !important;
  padding: 0 !important;
}
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
  padding: 0 !important;
  display: block !important;
}
/* Image — strip ALL spacing, fill full card width */
.woocommerce ul.products li.product a img,
.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product img.wp-post-image {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  border-radius: 4px 4px 0 0 !important;
  object-fit: cover !important;
}
/* Restore inner padding for text/buttons below the image */
.woocommerce ul.products li.product h2.woocommerce-loop-product__title,
.woocommerce ul.products li.product .price {
  padding-left: 16px !important;
  padding-right: 16px !important;
}
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
  padding-top: 14px !important;
}
.woocommerce ul.products li.product .button {
  margin: 0 16px 16px !important;
}
/* Fix empty gaps from hidden/out-of-stock products in grid */
.woocommerce ul.products li.product:empty {
  display: none !important;
}

/* ── Product grid: equal-height cards, no empty gaps ── */
.woocommerce ul.products {
  display: grid !important;
  align-items: stretch !important;
}
.woocommerce ul.products li.product {
  display: flex !important;
  flex-direction: column !important;
  height: auto !important;
}
.woocommerce ul.products li.product a.woocommerce-loop-product__link {
  flex: 1 !important;
  display: flex !important;
  flex-direction: column !important;
}
.woocommerce ul.products li.product h2.woocommerce-loop-product__title {
  flex: 1 !important;
}
/* Sold out badge style */
.woocommerce ul.products li.product .button.disabled,
.woocommerce ul.products li.product .added_to_cart ~ .button {
  background: #888 !important;
  color: #fff !important;
  opacity: 1 !important;
  cursor: default !important;
}

/* ── Cart & Checkout: brand-red buttons ── */
/* Block cart: Proceed to Checkout */
.wc-block-cart__submit-button,
.wc-block-components-button.wc-block-cart__submit-button {
  background-color: #CC0000 !important;
  color: #fff !important;
  border-color: #CC0000 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
.wc-block-cart__submit-button:hover {
  background-color: #AA0000 !important;
  border-color: #AA0000 !important;
}
/* Block checkout: Place Order */
.wc-block-components-checkout-place-order-button,
.wc-block-checkout__place-order .wc-block-components-button {
  background-color: #CC0000 !important;
  color: #fff !important;
  border-color: #CC0000 !important;
  border-radius: 6px !important;
  font-weight: 600 !important;
}
/* Classic cart/checkout fallback */
.woocommerce a.checkout-button,
a.checkout-button.button.alt,
#place_order {
  background-color: #CC0000 !important;
  color: #fff !important;
  border-color: #CC0000 !important;
}

/* ── Global: consistent rounded red/white styling ── */

/* All WooCommerce buttons: red, rounded */
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
  background-color: var(--brand-red) !important;
  color: #fff !important;
  border-radius: 6px !important;
  border: none !important;
  font-weight: 600 !important;
  transition: background-color 0.2s ease !important;
}
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce .button.alt:hover {
  background-color: var(--brand-red-dark) !important;
  color: #fff !important;
}

/* WC notices: red top border, rounded */
.woocommerce-message,
.woocommerce-info {
  border-top-color: var(--brand-red) !important;
  border-radius: 0 0 6px 6px !important;
}
.woocommerce-message::before,
.woocommerce-info::before {
  color: var(--brand-red) !important;
}
.woocommerce-message .button,
.woocommerce-info .button {
  background-color: var(--brand-red) !important;
  color: #fff !important;
  border-radius: 6px !important;
}

/* WC block notice (add-to-cart banner) */
.wc-block-components-notice-banner,
.wc-block-store-notices {
  border-radius: 6px !important;
  border-left-color: var(--brand-red) !important;
}
.wc-block-components-notice-banner a,
.wc-block-store-notices a {
  background-color: var(--brand-red) !important;
  border-radius: 6px !important;
  color: #fff !important;
  padding: 8px 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
}

/* Form inputs: softly rounded */
.woocommerce input[type="text"],
.woocommerce input[type="email"],
.woocommerce input[type="tel"],
.woocommerce input[type="number"],
.woocommerce input[type="password"],
.woocommerce textarea,
.woocommerce select {
  border-radius: 6px !important;
  border-color: #ddd !important;
}
.woocommerce input:focus,
.woocommerce select:focus,
.woocommerce textarea:focus {
  border-color: var(--brand-red) !important;
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(204,0,0,0.08) !important;
}

/* Product cards: subtle border */
.woocommerce ul.products li.product {
  border: 1px solid #eee !important;
  border-radius: 8px !important;
}

/* ── SPACING & WHITESPACE FIXES ─────────────────────────────────────── */

/* 1. Tighten oversized header */
.site-header .col-full,
.site-header > .col-full { padding-top: 8px !important; padding-bottom: 8px !important; }
.site-branding { margin-bottom: 0 !important; }
.site-header { min-height: 0 !important; }

/* 2. Shrink gap under "Shop" page title (was 96px bottom padding) */
.woocommerce-products-header { padding-bottom: 16px !important; padding-top: 8px !important; }
.woocommerce-products-header__title.page-title { margin-bottom: 0 !important; font-size: 1.4rem !important; }

/* 3. Breadcrumb — tighter */
.woocommerce-breadcrumb { margin-bottom: 8px !important; margin-top: 4px !important; font-size: 0.8rem !important; }

/* 4. Product cards — natural height, no fixed stretch */
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link { height: auto !important; }

/* Products with no thumbnail — compact faded placeholder */
.woocommerce ul.products li.product img.woocommerce-placeholder {
    height: 130px !important;
    opacity: 0.1 !important;
    object-fit: contain !important;
    padding: 20px !important;
    background: #f9f9f9 !important;
}

/* Real product images — uniform 180px, cover crop */
.woocommerce ul.products li.product img.wp-post-image,
.woocommerce ul.products li.product img.attachment-woocommerce_thumbnail {
    height: 180px !important;
    object-fit: cover !important;
}

/* 5. Product title — tighter */
.woocommerce-loop-product__title {
    font-size: 0.88rem !important;
    padding: 10px 12px 4px !important;
    line-height: 1.35 !important;
    margin-bottom: 4px !important;
}

/* 6. Price — tighter */
.woocommerce ul.products li.product .price {
    padding: 2px 12px 8px !important;
    font-size: 0.9rem !important;
    margin-bottom: 8px !important;
}

/* 7. Filter/results bar — reduce gap above grid */
.woocommerce-ordering, .woocommerce-result-count { margin-bottom: 10px !important; }

/* ── HEADER COMPACTION ───────────────────────────────────────────────── */
/* Logo was 1115px natural height, rendering at 142px — cap at 55px */
.site-branding img.custom-logo,
.site-branding .custom-logo-link img {
    max-height: 55px !important;
    width: auto !important;
    height: auto !important;
}
/* Remove the 42px top padding on the header itself */
.site-header { padding-top: 4px !important; padding-bottom: 4px !important; }

/* Shrink the gap between Shop title and product grid (page title bottom padding was 96px) */
.woocommerce-products-header,
.storefront-product-section .col-full { padding-bottom: 12px !important; }
.page-header.woocommerce-products-header { padding: 8px 0 12px !important; }

/* ── FINAL SPACING TIGHTENING ────────────────────────────────────────── */
/* Kill remaining gap between breadcrumb and shop title */
.storefront-breadcrumb { padding: 6px 0 !important; margin: 0 !important; }
.storefront-breadcrumb .col-full { padding-top: 6px !important; padding-bottom: 6px !important; }

/* Shop/archive page title block */
.woocommerce-products-header { padding: 8px 0 10px !important; margin: 0 !important; }
.woocommerce-products-header h1,
.woocommerce-products-header .page-title { margin: 0 !important; padding: 0 !important; font-size: 1.3rem !important; }

/* Content area top padding */
#content .col-full,
.storefront-primary-content { padding-top: 0 !important; }

/* Entry header on inner pages */
.entry-header { padding-bottom: 12px !important; padding-top: 8px !important; }

/* Shop product grid: show TOP of image (title text lives at top of product images) */
ul.products li.product img.attachment-woocommerce_thumbnail,
ul.products li.product img.wp-post-image {
  display: block !important;
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  object-position: top center !important;
}

/* Fix: WooCommerce clearfix ::before acts as ghost grid item in CSS Grid layout */
ul.products::before,
ul.products::after {
  display: none !important;
}

/* ===== HOMEPAGE LAYOUT FIXES ===== */

/* Banner hero: full width, no height restriction, natural proportions */
.entry-content .wp-block-image.alignfull img,
.entry-content figure.alignfull img {
  width: 100% !important;
  height: auto !important;
  display: block !important;
}

/* Force homepage blocks to be truly full viewport width. */
.home .entry-content > .wp-block-media-text,
.home .entry-content > .wp-block-media-text.alignwide,
.home .entry-content > .wp-block-columns {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  box-sizing: border-box !important;
}

/* Comfortable padding inside media-text content column */
.home .wp-block-media-text__content {
  padding: 3em 4em !important;
}

/* Group block inner containers stay readable */
.home .wp-block-group .wp-block-group__inner-container {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 2em;
}

/* ===== COMPACT HEADER ===== */
/* Row 1: Logo + Search - flex, vertically centred, tight padding */
.site-header > .col-full {
  display: flex !important;
  align-items: center !important;
  padding-top: 8px !important;
  padding-bottom: 12px !important;
}
.site-header > .col-full .site-branding {
  float: none !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
}
.site-header > .col-full .site-branding img {
  max-height: 54px !important;
  width: auto !important;
  display: block !important;
}
.site-header > .col-full .site-search {
  float: none !important;
  flex-shrink: 0 !important;
  margin: 0 0 0 auto !important;
}
.site-search .widget_product_search,
.site-search form {
  margin-bottom: 0 !important;
}
.site-search input[type="search"] {
  width: 180px !important;
}

/* Row 2: Nav + Cart - flex, vertically centred */
.storefront-primary-navigation {
  padding: 0 !important;
}
.storefront-primary-navigation > .col-full {
  display: flex !important;
  align-items: center !important;
  padding-top: 0 !important;
  padding-bottom: 8px !important;
}
.storefront-primary-navigation > .col-full nav.main-navigation {
  float: none !important;
  flex: 1 !important;
  margin: 0 !important;
}
.storefront-primary-navigation > .col-full .site-header-cart {
  float: none !important;
  flex-shrink: 0 !important;
  margin: 0 !important;
  align-self: center !important;
}
/* Reduce cart widget vertical padding */
.site-header-cart .cart-contents {
  padding: 4px 0 !important;
}