/*
Theme Name: Restomod
Theme URI: https://restomod.co.za
Author: Restomod
Author URI: https://restomod.co.za
Description: Custom Understrap child theme for the Restomod e-commerce store. Built on Bootstrap 5 with WooCommerce support, featuring the signature dark/red color scheme.
Template: understrap
Version: 1.0.0
Requires at least: 5.8
Tested up to: 6.4
Requires PHP: 7.4
License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: restomod
Tags: e-commerce, woocommerce, bootstrap, custom-menu, featured-images, footer-widgets, full-width-template, theme-options, translation-ready
*/

/* ==========================================================================
   CSS Variables / Design Tokens (ported from Magnetic/Ultra themes)
   ========================================================================== */
:root {
  --rm-red:            #cd4343;
  --rm-red-dark:       #cb4341;
  --rm-dark:           #121212;
  --rm-dark-alt:       #202020;
  --rm-dark-card:      #343434;
  --rm-light-bg:       #f8f9fa;
  --rm-border-light:   #efefef;
  --rm-gray-text:      #919191;
  --rm-white:          #ffffff;
  --rm-whatsapp-green: #3BE25A;
  --rm-sale-color:     #cd4343;
  --rm-link-blue:      #0073bc;
  --rm-font-family:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ==========================================================================
   Base / Typography
   ========================================================================== */
body {
  font-family: var(--rm-font-family);
  color: var(--rm-dark-alt);
  background-color: var(--rm-white);
}

a {
  color: var(--rm-red);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover,
a:focus {
  color: var(--rm-red-dark);
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

.description {
  color: var(--rm-gray-text);
}

/* ==========================================================================
   Header / Navbar
   ========================================================================== */
#wrapper-navbar {
  background-color: var(--rm-dark);
  color: var(--rm-white);
}

.navbar.restomod-navbar {
  background-color: var(--rm-dark) !important;
  padding: 10px 0;
}

.navbar .navbar-brand img {
  max-height: 80px;
  width: auto;
}

.navbar .navbar-brand {
  color: var(--rm-white);
  padding: 0;
}

/* Nav links */
.navbar .navbar-nav .nav-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
  padding: 12px 18px;
  transition: all 0.3s ease;
}

.navbar .navbar-nav .nav-link:hover,
.navbar .navbar-nav .nav-link:focus {
  color: var(--rm-white);
  background-color: var(--rm-red);
  border-radius: 4px;
}

.navbar .navbar-nav .nav-link.active,
.navbar .navbar-nav .current-menu-item > .nav-link {
  color: var(--rm-white);
  border-bottom: 3px solid var(--rm-red);
}

/* Dropdown menus */
.navbar .dropdown-menu {
  background-color: var(--rm-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 4px 4px;
  margin-top: 0;
  padding: 0;
}

.navbar .dropdown-menu .dropdown-item {
  color: rgba(255, 255, 255, 0.85);
  padding: 10px 20px;
  transition: all 0.2s ease;
}

.navbar .dropdown-menu .dropdown-item:hover,
.navbar .dropdown-menu .dropdown-item:focus {
  color: var(--rm-white);
  background-color: var(--rm-red);
}

/* Hamburger toggle */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.3);
  padding: 6px 10px;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Header utility area (cart + WhatsApp) */
.header-utils {
  display: flex;
  align-items: center;
  gap: 15px;
}

.header-utils .whatsapp-link {
  color: var(--rm-whatsapp-green);
  font-size: 2em;
  transition: transform 0.2s ease;
}

.header-utils .whatsapp-link:hover {
  transform: scale(1.1);
  text-decoration: none;
}

/* Cart badge */
.restomod-cart-block {
  color: var(--rm-white);
  background-color: var(--rm-red);
  padding: 6px 10px;
  border-radius: 50px;
  font-size: 1em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.restomod-cart-block:hover {
  background-color: var(--rm-red-dark);
  text-decoration: none;
}

.restomod-cart-block a {
  color: var(--rm-white);
  text-decoration: none;
}

.restomod-cart-block .cart-count {
  background-color: var(--rm-white);
  color: var(--rm-red);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75em;
  font-weight: 700;
}

/* ==========================================================================
   Primary Navigation (below header, sticky)
   ========================================================================== */
.primary-nav-wrapper {
  background: var(--rm-light-bg);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 500;
}

.primary-nav-wrapper .nav-link {
  color: #2c3e50;
  font-weight: 600;
  padding: 14px 18px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13px;
  transition: all 0.3s ease;
}

.primary-nav-wrapper .nav-link:hover {
  color: var(--rm-white);
  background-color: var(--rm-red);
}

/* ==========================================================================
   Page / Section Titles
   ========================================================================== */
.page-title,
.woocommerce-products-header__title {
  font-size: 2rem;
  font-weight: 700;
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.section-title {
  border-left: 4px solid var(--rm-red);
  padding-left: 15px;
  font-size: 1.8em;
  font-weight: 700;
  margin-bottom: 30px;
  text-transform: uppercase;
}

.section-title-underline {
  border-bottom: 2px solid var(--rm-red);
  text-transform: uppercase;
  font-size: 1.3em;
  font-weight: bold;
  padding-bottom: 8px;
  margin-bottom: 20px;
}

/* ==========================================================================
   Product Cards
   ========================================================================== */
.product-card {
  border: 1px solid var(--rm-border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  background: var(--rm-white);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.product-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.product-card .product-card-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.product-card .product-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-card-image img {
  transform: scale(1.05);
}

.product-card .product-card-body {
  padding: 15px;
  text-align: center;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.product-card .product-card-title {
  font-weight: 700;
  font-size: 0.95em;
  margin-bottom: 8px;
  min-height: 40px;
}

.product-card .product-card-title a {
  color: var(--rm-dark);
  text-decoration: none;
}

.product-card .product-card-title a:hover {
  color: var(--rm-red);
}

.product-card .product-card-price {
  font-size: 1.2em;
  font-weight: 700;
  margin-top: auto;
  padding-top: 8px;
}

.product-card .product-card-price .regular-price {
  text-decoration: line-through;
  color: #7b7a7a;
  font-size: 0.85em;
  display: block;
}

.product-card .product-card-price .sale-price {
  color: var(--rm-red);
  font-size: 1.1em;
}

/* Feature title bar (dark bg with red bottom border) */
.product-feature-title {
  background-color: var(--rm-dark);
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 4px solid var(--rm-red-dark);
  margin-top: -1px;
}

.product-feature-title a {
  color: var(--rm-white);
  text-decoration: none;
  font-size: 1.1em;
  text-transform: uppercase;
  padding: 6px;
  font-weight: 600;
}

.product-feature-title a:hover {
  color: var(--rm-white);
  text-decoration: none;
}

/* ==========================================================================
   Stock Badges
   ========================================================================== */
.stock-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  z-index: 10;
  letter-spacing: 0.5px;
}

.stock-badge.in-stock {
  background-color: #28a745;
  color: var(--rm-white);
}

.stock-badge.out-of-stock {
  background-color: #dc3545;
  color: var(--rm-white);
}

.stock-badge.on-backorder {
  background-color: #ffc107;
  color: var(--rm-dark);
}

.stock-badge.on-sale {
  background-color: var(--rm-red);
  color: var(--rm-white);
}

/* ==========================================================================
   Sale / Price Styling
   ========================================================================== */
.on-sale-price .regular-price,
.price del {
  text-decoration: line-through;
  color: #7b7a7a;
  text-decoration-thickness: 2px;
}

.on-sale-price .sale-price,
.price ins {
  color: var(--rm-red);
  font-weight: 700;
  text-decoration: none;
}

.display-price {
  font-size: 1.6em;
  font-weight: bold;
  padding-bottom: 4px;
  text-align: center;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-restomod {
  background-color: var(--rm-red);
  color: var(--rm-white);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
}

.btn-restomod:hover,
.btn-restomod:focus {
  background-color: var(--rm-red-dark);
  color: var(--rm-white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(205, 67, 67, 0.4);
}

.btn-restomod-outline {
  background-color: transparent;
  color: var(--rm-red);
  border: 2px solid var(--rm-red);
  padding: 8px 22px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  transition: all 0.3s ease;
}

.btn-restomod-outline:hover {
  background-color: var(--rm-red);
  color: var(--rm-white);
}

.btn-whatsapp {
  background-color: #25D366;
  color: var(--rm-white);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.btn-whatsapp:hover {
  background-color: #128C7E;
  color: var(--rm-white);
}

.btn-dark-restomod {
  background-color: var(--rm-dark);
  color: var(--rm-white);
  border: none;
  padding: 10px 24px;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-dark-restomod:hover {
  background-color: #2a2a2a;
  color: var(--rm-white);
}

/* ==========================================================================
   Benefits / Service Bar
   ========================================================================== */
.benefit {
  display: flex;
  flex-direction: row;
  background-color: var(--rm-dark-card);
  margin: 10px 0;
  color: var(--rm-white);
  border-radius: 7px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

.benefit:hover {
  transform: translateY(-2px);
}

.benefit .benefit-icon {
  width: 25%;
  min-width: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5em;
  padding: 12px;
}

.benefit .benefit-icon i {
  background-color: var(--rm-red);
  border-radius: 50%;
  height: 50px;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.benefit .right-container {
  width: 75%;
  padding: 10px 10px 10px 0;
}

.benefit .benefit-title {
  font-weight: bold;
  font-size: 15px;
  margin-bottom: 2px;
}

.benefit .benefit-description {
  font-size: 0.85em;
  opacity: 0.85;
}

/* ==========================================================================
   Article / Blog Cards
   ========================================================================== */
.article-wrapper {
  background-color: var(--rm-dark);
  border-bottom: 4px solid var(--rm-red-dark);
  height: 100%;
  border-radius: 0 0 4px 4px;
  overflow: hidden;
}

.article-title-wrapper {
  height: auto;
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  overflow: hidden;
  padding: 10px;
}

.article-title-wrapper a {
  color: var(--rm-white);
  text-decoration: none;
  font-size: 1em;
  font-weight: 600;
}

.article-title-wrapper a:hover {
  color: rgba(255, 255, 255, 0.8);
}

.article-title-wrapper .article-brands {
  display: flex;
  gap: 6px;
  margin-top: 5px;
}

/* Article category label */
.article-category {
  text-transform: uppercase;
  font-weight: bold;
  color: var(--rm-white);
  border-top: 2px solid var(--rm-red);
  padding-top: 4px;
  font-size: 0.8em;
  letter-spacing: 0.5px;
}

/* ==========================================================================
   Cars for Sale (archive)
   ========================================================================== */
.car-card {
  border: 1px solid var(--rm-border-light);
  border-radius: 8px;
  overflow: hidden;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
  background: var(--rm-white);
  height: 100%;
}

.car-card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
  transform: translateY(-3px);
}

.car-card .car-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.car-card .car-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.car-card:hover .car-card-image img {
  transform: scale(1.05);
}

.car-card .car-card-body {
  padding: 15px;
}

.car-card .car-card-title {
  font-size: 1.1em;
  font-weight: 700;
  margin-bottom: 6px;
}

.car-card .car-card-title a {
  color: var(--rm-dark);
  text-decoration: none;
}

.car-card .car-card-title a:hover {
  color: var(--rm-red);
}

.car-card .car-card-meta {
  font-size: 0.9em;
  color: var(--rm-gray-text);
  margin-bottom: 10px;
}

.car-card .car-card-price {
  font-size: 1.4em;
  font-weight: 700;
  color: var(--rm-red);
}

/* ==========================================================================
   Single Product Page
   ========================================================================== */
.single-product .product-brand-logo {
  max-height: 60px;
  margin-bottom: 15px;
}

.single-product .product-main-price {
  font-size: 2rem;
  font-weight: 700;
  margin: 15px 0;
}

.single-product .product-stock-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.85em;
  text-transform: uppercase;
  margin-bottom: 15px;
}

.single-product .woocommerce-tabs {
  margin-top: 40px;
}

.single-product .woocommerce-tabs .nav-tabs .nav-link {
  color: var(--rm-dark);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.9em;
}

.single-product .woocommerce-tabs .nav-tabs .nav-link.active {
  color: var(--rm-red);
  border-bottom: 3px solid var(--rm-red);
}

/* ==========================================================================
   WooCommerce Product Grid
   ========================================================================== */
.woocommerce ul.products li.product {
  text-align: center;
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  font-size: 0.95em;
  font-weight: 700;
  color: var(--rm-dark);
}

.woocommerce ul.products li.product .price {
  font-size: 1.1em;
  font-weight: 700;
}

.woocommerce ul.products li.product .add-to-cart-container .btn {
  background-color: var(--rm-red);
  border-color: var(--rm-red);
  color: var(--rm-white);
}

.woocommerce ul.products li.product .add-to-cart-container .btn:hover {
  background-color: var(--rm-red-dark);
  border-color: var(--rm-red-dark);
}

/* WooCommerce messages */
.woocommerce-message {
  border-top-color: var(--rm-red);
}

.woocommerce-message::before {
  color: var(--rm-red);
}

/* ==========================================================================
   Search / Filters
   ========================================================================== */
.restomod-search-bar {
  background-color: #f2f2f2;
  padding: 15px;
  border-radius: 7px;
  margin-bottom: 20px;
}

.restomod-search-bar .btn-search {
  background-color: var(--rm-red);
  color: var(--rm-white);
  border: none;
}

.restomod-search-bar .btn-search:hover {
  background-color: var(--rm-red-dark);
}

.restomod-search-bar .btn-reset {
  background-color: var(--rm-dark);
  color: var(--rm-white);
  border: none;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.bottom-container {
  background-color: var(--rm-dark);
  color: #ececec;
  padding: 40px 0;
}

.bottom-container a {
  color: var(--rm-white);
  text-decoration: none;
}

.bottom-container a:hover {
  color: var(--rm-red);
}

.bottom-container ul {
  list-style: none;
  padding: 0;
}

.bottom-container ul li {
  margin-bottom: 8px;
}

.bottom-container .footer-title {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 1.1em;
  margin-bottom: 15px;
  border-bottom: 2px solid var(--rm-red);
  padding-bottom: 8px;
}

.site-footer-copyright {
  background-color: #0a0a0a;
  color: rgba(255, 255, 255, 0.6);
  padding: 15px 0;
  font-size: 0.85em;
  text-align: center;
}

.site-footer-copyright a {
  color: rgba(255, 255, 255, 0.8);
}

.site-footer-copyright a:hover {
  color: var(--rm-white);
}

/* ==========================================================================
   Front Page / Hero Sections
   ========================================================================== */
.hero-section {
  position: relative;
  background-size: cover;
  background-position: center;
  color: var(--rm-white);
  padding: 80px 0;
  text-align: center;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}

.hero-section .hero-content {
  position: relative;
  z-index: 2;
}

.hero-section .hero-title {
  font-size: 3rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-section .hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.section-wrapper {
  padding: 50px 0;
}

.section-wrapper.bg-light-gray {
  background-color: var(--rm-light-bg);
}

.section-wrapper.bg-dark {
  background-color: var(--rm-dark);
  color: var(--rm-white);
}

/* ==========================================================================
   Single Article / Blog Templates
   ========================================================================== */
.article-hero {
  position: relative;
  margin-bottom: 30px;
}

.article-hero img {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 8px;
}

.article-lead {
  font-size: 1.25em;
  color: #555;
  line-height: 1.7;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--rm-border-light);
}

.article-body {
  font-size: 1.05em;
  line-height: 1.8;
}

.article-body h2,
.article-body h3 {
  margin-top: 30px;
  margin-bottom: 15px;
}

.article-gallery {
  margin-top: 30px;
}

.article-gallery img {
  border-radius: 4px;
  margin-bottom: 15px;
}

/* Blog-specific: second title and video */
.blog-second-title {
  font-size: 1.4em;
  color: var(--rm-gray-text);
  font-weight: 400;
  margin-bottom: 20px;
}

.blog-video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin-bottom: 30px;
  border-radius: 8px;
}

.blog-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination .page-link {
  background-color: var(--rm-red);
  border-color: var(--rm-red);
  color: var(--rm-white);
  border-radius: 50px;
  margin: 0 3px;
  padding: 6px 14px;
}

.pagination .page-link:hover {
  background-color: var(--rm-red-dark);
  border-color: var(--rm-red-dark);
  color: var(--rm-white);
}

.pagination .page-item.active .page-link {
  background-color: var(--rm-dark);
  border-color: var(--rm-dark);
}

/* ==========================================================================
   Badges
   ========================================================================== */
.badge-restomod {
  background-color: var(--rm-red);
  color: var(--rm-white);
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 991.98px) {
  .hero-section .hero-title {
    font-size: 2rem;
  }

  .section-title {
    font-size: 1.4em;
  }
}

@media (max-width: 767.98px) {
  .hero-section {
    padding: 50px 0;
  }

  .hero-section .hero-title {
    font-size: 1.6rem;
  }

  .header-utils {
    justify-content: flex-end;
    margin-top: 10px;
  }

  .product-feature-title {
    height: auto;
    padding: 10px;
  }

  .product-feature-title a {
    font-size: 0.9em;
    line-height: 1.2;
  }

  .section-wrapper {
    padding: 30px 0;
  }

  .benefit {
    margin: 5px 0;
  }
}

@media (max-width: 575.98px) {
  .restomod-cart-block {
    font-size: 0.85em;
    padding: 4px 8px;
  }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
  #wrapper-navbar,
  .bottom-container,
  .site-footer-copyright,
  .primary-nav-wrapper {
    display: none !important;
  }

  body {
    font-size: 12px;
    color: #000;
  }
}
