/* ===========================================
   Llobregat Hardware Store - Custom Theme
   =========================================== */

:root {
  --hw-dark: #0d1117;
  --hw-darker: #010409;
  --hw-gray: #21262d;
  --hw-lightgray: #30363d;
  --hw-border: #484f58;
  --hw-border-light: #30363d;
  --hw-text: #c9d1d9;
  --hw-text-muted: #8b949e;
  --hw-text-dim: #6e7681;
  --hw-orange: #f0883e;
  --hw-orange-hover: #f6a35f;
  --hw-orange-dim: rgba(240, 136, 62, 0.15);
  --hw-blue: #58a6ff;
  --hw-green: #3fb950;
  --hw-red: #f85149;
  --hw-card-bg: #161b22;
  --hw-nav-bg: #161b22;
  --hw-footer-bg: #161b22;
}

body {
  background-color: var(--hw-dark);
  color: var(--hw-text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}
a { color: var(--hw-blue); }
a:hover { color: var(--hw-orange); text-decoration: none; }
h1, h2, h3, h4, h5, h6 { color: #ffffff; font-weight: 700; letter-spacing: -0.02em; }
hr { border-color: var(--hw-border); }

/* --- Header --- */
.header-banner { display: none; }
.header-nav {
  background: var(--hw-darker) !important;
  border-bottom: 1px solid var(--hw-border);
}
.header-nav .container { max-width: 100%; padding: 0 2rem; }
#contact-link a, .user-info a, .cart-preview .header {
  color: var(--hw-text-muted) !important;
  font-size: 0.85rem;
  transition: color 0.2s;
}
#contact-link a:hover, .user-info a:hover { color: var(--hw-orange) !important; }

.header-top {
  background: var(--hw-nav-bg) !important;
  border-bottom: 1px solid var(--hw-border);
  padding: 0.75rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.header-top .container { max-width: 100%; padding: 0 2rem; }

/* Logo */
#_desktop_logo { padding-top: 0; }
#_desktop_logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-decoration: none;
}
#_desktop_logo a:hover { color: var(--hw-orange); }
#_desktop_logo img {
  max-height: 42px;
  width: auto;
  border-radius: 4px;
}

/* --- Search Bar --- */
#search_widget form { position: relative; }
#search_widget form input[type=text] {
  background: var(--hw-gray);
  border: 1px solid var(--hw-border);
  border-radius: 6px;
  color: var(--hw-text);
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  font-size: 0.9rem;
  min-width: 300px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#search_widget form input[type=text]::placeholder { color: var(--hw-text-dim); }
#search_widget form input[type=text]:focus {
  border-color: var(--hw-orange);
  box-shadow: 0 0 0 3px var(--hw-orange-dim);
  outline: none;
}
#search_widget form button {
  position: absolute;
  left: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
}
#search_widget form button i { color: var(--hw-text-muted); font-size: 1.1rem; }
#search_widget form button:hover i { color: var(--hw-orange); }

/* --- Top Menu --- */
#top-menu {
  background: var(--hw-gray);
  border-bottom: 1px solid var(--hw-border);
}
#top-menu a {
  color: var(--hw-text) !important;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0.65rem 1rem !important;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: color 0.2s, background 0.2s;
}
#top-menu a:hover, #top-menu a:focus {
  color: var(--hw-orange) !important;
  background: var(--hw-nav-bg);
}
#top-menu .sub-menu {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}
#top-menu .sub-menu a {
  color: var(--hw-text-muted) !important;
  text-transform: none;
  font-weight: 400;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
}
#top-menu .sub-menu a:hover { color: var(--hw-orange) !important; }

/* --- Buttons --- */
.btn-primary {
  background: var(--hw-orange);
  border: none;
  color: #000000;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.6rem 1.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}
.btn-primary:hover {
  background: var(--hw-orange-hover);
  color: #000000;
  box-shadow: 0 4px 12px rgba(240, 136, 62, 0.3);
  transform: translateY(-1px);
}
.btn-secondary, .btn-tertiary {
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
  background: transparent;
}
.btn-secondary:hover {
  border-color: var(--hw-orange);
  color: var(--hw-orange);
}

/* --- Cards --- */
.card, .card-block {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
}

/* --- Product Miniature --- */
.product-miniature {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.25s ease;
  margin-bottom: 1.5rem;
}
.product-miniature:hover {
  border-color: var(--hw-orange);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  transform: translateY(-3px);
}
.product-miniature .thumbnail-container {
  background: var(--hw-dark);
  padding: 1rem;
}
.product-miniature .thumbnail-container img {
  mix-blend-mode: normal;
  transition: transform 0.3s;
}
.product-miniature:hover .thumbnail-container img { transform: scale(1.03); }
.product-miniature .product-title a {
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.3;
}
.product-miniature .product-title a:hover { color: var(--hw-orange); }
.product-miniature .product-price-and-shipping {
  color: var(--hw-orange);
  font-weight: 700;
  font-size: 1.15rem;
}
.product-miniature .regular-price {
  color: var(--hw-text-dim);
  font-size: 0.85rem;
  text-decoration: line-through;
}
.product-miniature .product-description {
  color: var(--hw-text-muted);
  font-size: 0.85rem;
}
.product-miniature .highlighted-informations {
  background: var(--hw-card-bg);
}
.product-miniature .variant-links a {
  border-color: var(--hw-border);
}
.product-miniature .variant-links a:hover {
  border-color: var(--hw-orange);
}

/* --- Product Page --- */
.product-page .product-information,
#product #main {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  padding: 2rem;
}
.product-page .product-name { color: #ffffff; font-size: 1.8rem; font-weight: 800; }
.product-page .current-price { color: var(--hw-orange); font-size: 1.8rem; font-weight: 700; }
.product-page .product-description { color: var(--hw-text-muted); line-height: 1.7; }
.product-page .form-control {
  background: var(--hw-gray);
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
  border-radius: 6px;
}
.product-page .form-control:focus {
  border-color: var(--hw-orange);
  box-shadow: 0 0 0 3px var(--hw-orange-dim);
}
.product-page .product-quantity .qty .input-group {
  background: var(--hw-gray);
  border: 1px solid var(--hw-border);
  border-radius: 6px;
}
/* Tabs on product page */
.product-page .tabs {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  margin-top: 1.5rem;
}
.product-page .nav-tabs .nav-link {
  color: var(--hw-text-muted);
  border: none;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
}
.product-page .nav-tabs .nav-link.active {
  color: var(--hw-orange);
  background: transparent;
  border-bottom: 2px solid var(--hw-orange);
}
.product-page .tab-content { padding: 1.5rem; }

/* --- Category Page --- */
#category #main { background: transparent; }
.block-category {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}
.block-category h1 { font-size: 1.6rem; }
.block-category .category-name { color: #ffffff; }
.category-sub-menu a {
  color: var(--hw-text-muted);
  font-size: 0.9rem;
}
.category-sub-menu a:hover { color: var(--hw-orange); }

/* --- Footer --- */
footer#footer {
  background: var(--hw-footer-bg) !important;
  border-top: 1px solid var(--hw-border);
  padding: 2.5rem 0;
  margin-top: 3rem;
}
footer#footer .container { max-width: 100%; padding: 0 2rem; }
footer#footer h4 {
  color: #ffffff;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}
footer#footer a {
  color: var(--hw-text-muted);
  font-size: 0.9rem;
  transition: color 0.2s;
}
footer#footer a:hover { color: var(--hw-orange); }
footer#footer li { margin-bottom: 0.4rem; }
footer#footer .block-newsletter {
  background: var(--hw-gray);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--hw-border);
}
footer#footer .block-newsletter input[type=text],
footer#footer .block-newsletter input[type=email] {
  background: var(--hw-dark);
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
  border-radius: 6px;
  padding: 0.5rem 1rem;
}
footer#footer .block-newsletter input:focus {
  border-color: var(--hw-orange);
}
footer#footer .block-social {
  margin-top: 1rem;
}
footer#footer .block-social a {
  color: var(--hw-text-muted) !important;
  font-size: 1.3rem;
  margin-right: 0.75rem;
  transition: color 0.2s;
}
footer#footer .block-social a:hover { color: var(--hw-orange) !important; }

/* --- Footer Copyright --- */
footer#footer .footer-copyright {
  border-top: 1px solid var(--hw-border);
  margin-top: 2rem;
  padding-top: 1.5rem;
  color: var(--hw-text-dim);
  font-size: 0.85rem;
  text-align: center;
}

/* --- Breadcrumb --- */
.breadcrumb {
  background: transparent;
  padding: 0.75rem 0;
  margin: 0;
}
.breadcrumb ol li a {
  color: var(--hw-text-muted);
  font-size: 0.85rem;
}
.breadcrumb ol li a:hover { color: var(--hw-orange); }
.breadcrumb ol li:last-child { color: var(--hw-text); }

/* --- Forms --- */
.form-control {
  background: var(--hw-gray);
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
  border-radius: 6px;
}
.form-control:focus {
  border-color: var(--hw-orange);
  box-shadow: 0 0 0 3px var(--hw-orange-dim);
}
.form-control::placeholder { color: var(--hw-text-dim); }
.form-group label { color: var(--hw-text); font-weight: 600; font-size: 0.9rem; }

/* --- Tables --- */
.table { color: var(--hw-text); }
.table th {
  border-bottom: 2px solid var(--hw-border);
  color: var(--hw-text-muted);
  text-transform: uppercase;
  font-size: 0.8rem;
}
.table td { border-top: 1px solid var(--hw-border); }

/* --- Alerts --- */
.alert-success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid var(--hw-green);
  color: var(--hw-green);
}
.alert-danger {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid var(--hw-red);
  color: var(--hw-red);
}
.alert-warning {
  background: rgba(240, 136, 62, 0.1);
  border: 1px solid var(--hw-orange);
  color: var(--hw-orange);
}

/* --- Modal --- */
.modal-content {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
}
.modal-header { border-bottom: 1px solid var(--hw-border); }
.modal-footer { border-top: 1px solid var(--hw-border); }

/* --- Pagination --- */
.page-link {
  background: var(--hw-gray) !important;
  border: 1px solid var(--hw-border) !important;
  color: var(--hw-text) !important;
}
.page-link:hover {
  background: var(--hw-orange) !important;
  border-color: var(--hw-orange) !important;
  color: #000000 !important;
}
.page-item.active .page-link {
  background: var(--hw-orange) !important;
  border-color: var(--hw-orange) !important;
  color: #000000 !important;
}

/* --- Cart/Checkout --- */
.cart-grid-body, .cart-grid-right {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  padding: 1.5rem;
}
.cart-summary-line { color: var(--hw-text-muted); }
.cart-summary-line.value { color: var(--hw-text); font-weight: 700; }

/* --- Account Pages --- */
#identity .form-control, #authentication .form-control {
  background: var(--hw-gray);
  border: 1px solid var(--hw-border);
  color: var(--hw-text);
}

/* --- Hero Section (Homepage) --- */
.hw-hero {
  background: linear-gradient(135deg, var(--hw-darker) 0%, var(--hw-gray) 50%, var(--hw-darker) 100%);
  border-bottom: 1px solid var(--hw-border);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 0;
  position: relative;
  overflow: hidden;
}
.hw-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(240, 136, 62, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(88, 166, 255, 0.06) 0%, transparent 50%);
  pointer-events: none;
}
.hw-hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  position: relative;
  color: #ffffff;
}
.hw-hero p {
  color: var(--hw-text-muted);
  font-size: 1.15rem;
  max-width: 600px;
  margin: 0 auto 2rem;
  position: relative;
  line-height: 1.6;
}
.hw-hero .btn-primary {
  padding: 0.75rem 2.5rem;
  font-size: 1.05rem;
  position: relative;
}

/* Features Section */
.hw-features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hw-feature-item {
  background: var(--hw-card-bg);
  border: 1px solid var(--hw-border);
  border-radius: 8px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s;
}
.hw-feature-item:hover {
  border-color: var(--hw-orange);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}
.hw-feature-item .hw-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1;
}
.hw-feature-item h3 {
  font-size: 1rem;
  margin-bottom: 0.4rem;
  color: #ffffff;
  font-weight: 600;
}
.hw-feature-item p {
  color: var(--hw-text-muted);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.4;
}

/* --- Section title (homepage) --- */
h2.h1.products-section-title,
.section-title {
  color: #ffffff !important;
  font-weight: 700;
  text-align: center;
  margin: 2rem 0 1.5rem;
}

/* --- Responsive --- */
@media (max-width: 992px) {
  .hw-features { grid-template-columns: repeat(2, 1fr); }
  #search_widget form input[type=text] { min-width: 200px; }
}
@media (max-width: 768px) {
  .header-top .container { padding: 0 1rem; }
  .header-nav .container { padding: 0 1rem; }
  .hw-hero { padding: 2.5rem 1rem; }
  .hw-hero h1 { font-size: 1.6rem; }
  .hw-hero p { font-size: 1rem; }
  .hw-features { padding: 1rem; gap: 0.75rem; }
  .hw-feature-item { padding: 1rem; }
  .hw-feature-item .hw-icon { font-size: 1.5rem; }
  #search_widget form input[type=text] { min-width: 150px; }
  footer#footer .container { padding: 0 1rem; }
}
@media (max-width: 576px) {
  .hw-features { grid-template-columns: repeat(2, 1fr); padding: 0.75rem; gap: 0.5rem; }
  .hw-hero { padding: 2rem 1rem; }
  .hw-hero h1 { font-size: 1.3rem; }
}
