/*
Theme Name: Al-Madina Building Materials
Theme URI: https://al-madina.com
Author: Al-Madina
Description: A bold, professional theme for Al-Madina Building Materials Company
Version: 1.0
*/

:root {
  --orange: #E8510A;
  --orange-dark: #C44008;
  --orange-light: #FF6B2B;
  --black: #1A1A1A;
  --dark: #111111;
  --gray: #2C2C2C;
  --gray-mid: #555555;
  --gray-light: #F5F5F5;
  --white: #FFFFFF;
  --font-main: 'Barlow Condensed', sans-serif;
  --font-body: 'Barlow', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--black);
  background: var(--white);
  overflow-x: hidden;
}

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

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

ul { list-style: none; }

/* ===== HEADER ===== */
#site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: var(--dark);
  border-bottom: 3px solid var(--orange);
  transition: all 0.3s ease;
}

#site-header.scrolled {
  background: rgba(17,17,17,0.97);
  backdrop-filter: blur(8px);
}

.header-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 75px;
}

.site-logo img {
  height: 52px;
  width: auto;
}

.site-logo span {
  font-family: var(--font-main);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
  text-transform: uppercase;
}

.site-logo span em {
  color: var(--orange);
  font-style: normal;
}

nav#main-nav ul {
  display: flex;
  gap: 2.5rem;
  align-items: center;
}

nav#main-nav a {
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  position: relative;
  padding-bottom: 4px;
  transition: color 0.3s;
}

nav#main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.3s ease;
}

nav#main-nav a:hover,
nav#main-nav a.active {
  color: var(--orange);
}

nav#main-nav a:hover::after,
nav#main-nav a.active::after {
  width: 100%;
}

.btn-header {
  background: var(--orange);
  color: var(--white) !important;
  padding: 10px 24px;
  border-radius: 2px;
  font-family: var(--font-main) !important;
  font-weight: 700 !important;
  letter-spacing: 2px !important;
  text-transform: uppercase;
  transition: background 0.3s, transform 0.2s !important;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.btn-header:hover {
  background: var(--orange-light) !important;
  transform: translateY(-2px);
}

.btn-header::after { display: none !important; }

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
}

.hamburger span {
  display: block;
  width: 26px;
  height: 2px;
  background: var(--white);
  transition: all 0.3s;
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  background: var(--dark);
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 75px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -45deg,
      transparent,
      transparent 40px,
      rgba(232,81,10,0.04) 40px,
      rgba(232,81,10,0.04) 41px
    );
  pointer-events: none;
}

.hero-accent {
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  width: 600px;
  height: 600px;
  background: var(--orange);
  clip-path: polygon(30% 0%, 100% 0%, 100% 100%, 0% 100%);
  opacity: 0.08;
}

.hero-accent-2 {
  position: absolute;
  left: 0; bottom: 0;
  width: 400px;
  height: 3px;
  background: linear-gradient(90deg, var(--orange), transparent);
}

.hero-content {
  max-width: 1300px;
  margin: 0 auto;
  padding: 4rem 2rem;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.hero-eyebrow span {
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.hero-eyebrow::before {
  content: '';
  display: block;
  width: 40px;
  height: 2px;
  background: var(--orange);
}

.hero h1 {
  font-family: var(--font-main);
  font-size: clamp(3rem, 6vw, 5.5rem);
  font-weight: 800;
  line-height: 1;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -1px;
  margin-bottom: 1.5rem;
}

.hero h1 span {
  color: var(--orange);
  display: block;
}

.hero-desc {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.8;
  max-width: 500px;
  margin-bottom: 2.5rem;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
  padding: 14px 36px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 2px solid var(--orange);
  cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: all 0.3s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--orange-light);
  border-color: var(--orange-light);
  transform: translateY(-3px);
}

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 14px 36px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  border: 2px solid rgba(255,255,255,0.3);
  cursor: pointer;
  clip-path: polygon(10px 0%, 100% 0%, calc(100% - 10px) 100%, 0% 100%);
  transition: all 0.3s;
  display: inline-block;
}

.btn-secondary:hover {
  border-color: var(--orange);
  color: var(--orange);
}

.hero-stats {
  display: flex;
  gap: 2.5rem;
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.stat-item {}

.stat-number {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--orange);
  line-height: 1;
}

.stat-label {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 4px;
}

.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-frame {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.hero-img-frame::before {
  content: '';
  position: absolute;
  top: -15px;
  right: -15px;
  width: 100%;
  height: 100%;
  border: 2px solid var(--orange);
  opacity: 0.4;
  clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
}

.hero-img-frame img {
  width: 100%;
  clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
  filter: brightness(0.85) contrast(1.1);
}

.hero-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--gray) 0%, var(--black) 100%);
  clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

.hero-img-placeholder svg {
  width: 80px;
  height: 80px;
  opacity: 0.3;
  fill: var(--orange);
}

.hero-img-placeholder p {
  color: rgba(255,255,255,0.3);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== SECTION COMMONS ===== */
section { padding: 6rem 0; }

.section-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section-header {
  margin-bottom: 4rem;
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}

.section-eyebrow span {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--orange);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.section-eyebrow::before {
  content: '';
  display: block;
  width: 30px;
  height: 2px;
  background: var(--orange);
}

.section-title {
  font-family: var(--font-main);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.section-title.dark { color: var(--white); }

.section-subtitle {
  margin-top: 1rem;
  font-size: 1rem;
  color: var(--gray-mid);
  max-width: 600px;
  line-height: 1.7;
}

.section-subtitle.light { color: rgba(255,255,255,0.55); }

/* ===== PRODUCTS SECTION ===== */
#products {
  background: var(--gray-light);
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5px;
  background: rgba(0,0,0,0.08);
}

.product-card {
  background: var(--white);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.product-card:hover {
  transform: translateY(-4px);
  z-index: 2;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--gray);
  position: relative;
}

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

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

.product-card-img-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2C2C2C 0%, #1A1A1A 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.product-card-img-placeholder svg {
  width: 50px;
  height: 50px;
  fill: var(--orange);
  opacity: 0.4;
}

.product-badge {
  position: absolute;
  top: 1rem;
  left: 0;
  background: var(--orange);
  color: var(--white);
  font-family: var(--font-main);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 5px 14px 5px 10px;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 100%, 0 100%);
}

.product-card-body {
  padding: 1.5rem;
}

.product-cat {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

.product-name {
  font-family: var(--font-main);
  font-size: 1.3rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--dark);
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.product-desc {
  font-size: 0.9rem;
  color: var(--gray-mid);
  line-height: 1.6;
  margin-bottom: 1.25rem;
}

.product-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.spec-tag {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--dark);
  background: var(--gray-light);
  padding: 4px 10px;
  border-left: 2px solid var(--orange);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.product-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-main);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 2px;
  transition: gap 0.3s;
}

.product-link::after {
  content: '→';
  transition: transform 0.3s;
}

.product-card:hover .product-link {
  gap: 12px;
}

/* ===== WHY US ===== */
#why-us {
  background: var(--dark);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2px;
  background: rgba(255,255,255,0.05);
  margin-top: 3rem;
}

.feature-item {
  background: var(--dark);
  padding: 2.5rem;
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.feature-item::before {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: var(--orange);
  transition: width 0.4s ease;
}

.feature-item:hover {
  background: #1E1E1E;
}

.feature-item:hover::before {
  width: 100%;
}

.feature-icon {
  width: 52px;
  height: 52px;
  background: rgba(232,81,10,0.12);
  border: 1px solid rgba(232,81,10,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  clip-path: polygon(8px 0%, 100% 0%, calc(100% - 8px) 100%, 0% 100%);
}

.feature-icon svg {
  width: 24px;
  height: 24px;
  fill: var(--orange);
}

.feature-title {
  font-family: var(--font-main);
  font-size: 1.15rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--white);
  letter-spacing: 1px;
  margin-bottom: 0.75rem;
}

.feature-desc {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
}

/* ===== ABOUT STRIP ===== */
#about {
  background: var(--orange);
  padding: 5rem 0;
}

.about-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-text .section-eyebrow span { color: var(--white); }
.about-text .section-eyebrow::before { background: var(--white); }

.about-text .section-title {
  color: var(--white);
}

.about-body {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.8;
  margin-top: 1.5rem;
}

.about-img {
  position: relative;
}

.about-img img {
  width: 100%;
  clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
}

.about-img-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: rgba(0,0,0,0.15);
  clip-path: polygon(20px 0%, 100% 0%, calc(100% - 20px) 100%, 0% 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-img-placeholder p {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

/* ===== CONTACT ===== */
#contact {
  background: var(--dark);
  padding: 6rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: start;
}

.contact-info .section-title { color: var(--white); }

.contact-details {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background: rgba(232,81,10,0.1);
  border: 1px solid rgba(232,81,10,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 18px;
  height: 18px;
  fill: var(--orange);
}

.contact-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.4);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 1rem;
  color: var(--white);
  font-weight: 500;
}

.contact-form {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 2.5rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--white);
  padding: 12px 16px;
  font-family: var(--font-body);
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--orange);
}

.form-group select option { background: var(--dark); }

.form-group textarea {
  height: 130px;
  resize: vertical;
}

.form-submit .btn-primary {
  width: 100%;
  text-align: center;
  border: none;
  font-size: 1rem;
  padding: 16px;
  clip-path: none;
}

/* ===== FOOTER ===== */
#site-footer {
  background: #0A0A0A;
  padding: 4rem 0 0;
}

.footer-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
}

.footer-brand {}

.footer-logo {
  font-family: var(--font-main);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

.footer-logo span { color: var(--orange); }

.footer-tagline {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.35);
  line-height: 1.7;
  max-width: 260px;
}

.footer-col-title {
  font-family: var(--font-main);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--orange);
  margin-bottom: 1.25rem;
}

.footer-links li { margin-bottom: 0.6rem; }

.footer-links a {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.45);
  transition: color 0.3s;
}

.footer-links a:hover { color: var(--orange); }

.footer-bottom {
  margin-top: 3rem;
  padding: 1.5rem 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.25);
}

.footer-copy span { color: var(--orange); }

/* ===== SCROLL ANIMATIONS ===== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .hero-content { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .about-inner { grid-template-columns: 1fr; }
  .about-img { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav#main-nav { display: none; }
  nav#main-nav.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 75px; left: 0; right: 0;
    background: var(--dark);
    padding: 2rem;
    border-top: 2px solid var(--orange);
  }
  nav#main-nav.open ul {
    flex-direction: column;
    gap: 1.5rem;
  }
  .hamburger { display: flex; }
  .hero { padding-top: 75px; }
  section { padding: 4rem 0; }
  .footer-inner { grid-template-columns: 1fr; }
  .hero-stats { flex-wrap: wrap; gap: 1.5rem; }
}

/* ===== SINGLE PRODUCT PAGE ===== */
.product-single {
  padding-top: calc(75px + 3rem);
  padding-bottom: 4rem;
  min-height: 100vh;
}

.product-single-inner {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.product-gallery img {
  width: 100%;
  clip-path: polygon(15px 0%, 100% 0%, calc(100% - 15px) 100%, 0% 100%);
}

.product-info .product-cat {
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
}

.product-info h1 {
  font-family: var(--font-main);
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.product-info .product-desc {
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2rem;
}

.product-full-specs {
  border-top: 2px solid var(--orange);
  padding-top: 1.5rem;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--gray-light);
}

.spec-row:last-child { border-bottom: none; }

.spec-key {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--gray-mid);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.spec-val {
  font-size: 0.9rem;
  color: var(--dark);
  font-weight: 500;
}

@media (max-width: 768px) {
  .product-single-inner { grid-template-columns: 1fr; }
}
