/*
Theme Name: MAT4U Custom Theme
Author: Devan
Version: 1.0
Text Domain: mat4u-theme
*/

/* Google font */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

:root {
  --color-bg: #f3f4f6;
  --color-border: #e5e7eb;
  --color-text: #111827;
  --color-muted: #6b7280;
  --color-primary: #111827;
  --color-secondary-bg: #e5e7eb;
  --color-white: #ffffff;
  --color-dark: #111827;
  --color-footer-bg: #111827;
  --color-footer-text: #f9fafb;
  --color-green: #22c55e;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", sans-serif;
  color: var(--color-text);
  background-color: #ffffff;
}

/* Utility container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ================= NAVBAR ================= */

.navbar {
  width: 100%;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.navbar-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

.navbar-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.navbar-socials {
  display: flex;
  gap: 1rem;
}

.navbar-social-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.navbar-social-link:hover {
  color: var(--color-text);
}

.navbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 0;
}

.navbar-logo h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--color-primary);
}

.navbar-links {
  display: none;
  align-items: center;
  gap: 2rem;
  padding: 0 2rem;
}

.navbar-link {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.navbar-link:hover {
  color: var(--color-primary);
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.icon-button {
  border: none;
  background: transparent;
  padding: 0.4rem;
  border-radius: 999px;
  font-size: 1rem;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease;
}

.icon-button:hover {
  background-color: var(--color-secondary-bg);
}

.icon-button:active {
  transform: scale(0.95);
}

.navbar-menu-toggle {
  font-size: 1.2rem;
}

/* Mobile menu */
.navbar-mobile {
  display: none;
  background-color: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.navbar-mobile-links {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
}

.navbar-mobile-link {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  text-decoration: none;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.navbar-mobile-link:hover {
  color: var(--color-primary);
}





/* Desktop breakpoint */
@media (min-width: 768px) {
  .navbar-links {
    display: flex;
  }

  .navbar-menu-toggle {
    display: none;
  }

  .navbar-mobile {
    display: none !important;
  }
}

/* ================= HERO ================= */

.hero-banner {
  position: relative;
  width: 100%;
  height: 600px;
  overflow: hidden;
}

@media (min-width: 768px) {
  .hero-banner {
    height: 700px;
  }
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image: url("assets/hero-rug.jpg");
  background-size: cover;
  background-position: center;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
}

.hero-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
}

.hero-title-text {
  font-weight: 700;
  letter-spacing: 0.16em;
  margin: 0 0 0.75rem;
  font-size: 2.5rem;
}

.hero-subtitle-text {
  margin: 0 0 2rem;
  font-size: 1.125rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
}

@media (min-width: 768px) {
  .hero-title-text {
    font-size: 4rem;
  }

  .hero-subtitle-text {
    font-size: 1.25rem;
  }
}

.btn-hero {
  background-color: #ffffff;
  color: #000000;
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  border: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-weight: 500;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
}

.btn-hero:hover {
  background-color: #e5e7eb;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.35);
}

.btn-hero:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ================= FLASH SALE ================= */

.flash-sale {
  background-color: var(--color-bg);
  padding: 4rem 0;
  text-align: center;
}

.flash-sale-inner h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.flash-sale-inner p {
  font-size: 1rem;
  color: var(--color-muted);
}

/* ================= PROMO GRID ================= */

.promo-grid {
  background-color: var(--color-bg);
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 2rem 1rem;
}

@media (min-width: 768px) {
  .promo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 2rem 2rem 3rem;
  }
}

.promo-card {
  position: relative;
  height: 400px;
  overflow: hidden;
  border-radius: 0.75rem;
}

.promo-card-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
}

.promo-card-content {
  position: relative;
  z-index: 1;
  height: 100%;
  color: #ffffff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.5rem;
}

.promo-card-kicker {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 0.5rem;
}

.promo-card-title {
  font-size: 1.875rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.promo-card-text {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

/* ================= CATEGORY GRID ================= */

.category-grid {
  background-color: var(--color-bg);
  padding: 4rem 0;
}

.category-grid-inner {
  text-align: center;
}

.category-grid-inner h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.category-grid-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .category-grid-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.category-card {
  cursor: pointer;
}

.category-image {
  width: 100%;
  height: 220px;
  border-radius: 0.75rem;
  background-size: cover;
  background-position: center;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18);
  transition: transform 0.2s ease;
}

.category-card:hover .category-image {
  transform: scale(1.05);
}

.category-card p {
  margin-top: 0.75rem;
  font-weight: 500;
}

/* ================= OVERLAY CONTENT SECTIONS ================= */

.content-section {
  position: relative;
  width: 100%;
  height: 500px;
  overflow: hidden;
}

.content-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.content-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.1);
}

.content-box {
  position: absolute;
  top: 50%;
  max-width: 320px;
  padding: 2rem;
  background-color: #ffffff;
  transform: translateY(-50%);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.25);
}

.content-section-right .content-box {
  right: 2.5rem;
}

.content-section-left .content-box {
  left: 2.5rem;
}

/* Center both promo boxes on small screens */
@media (max-width: 767px) {
  .content-box {
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%);
    width: calc(100% - 3rem);
  }
}

.content-kicker {
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #6b7280;
  margin-bottom: 0.5rem;
}

.content-title {
  font-size: 1.75rem;
  margin: 0 0 0.75rem;
}

.content-text {
  color: #4b5563;
  margin-bottom: 1.25rem;
}

/* ================= PRODUCT GRID ================= */

.product-grid {
  background-color: #ffffff;
  padding: 4rem 0;
}

.product-grid-inner {
  text-align: center;
}

.product-grid-inner h2 {
  font-size: 2rem;
  margin-bottom: 2.5rem;
}

.product-grid-items {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2rem;
}

@media (min-width: 768px) {
  .product-grid-items {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.product-card {
  background-color: #f9fafb;
  border-radius: 0.75rem;
  overflow: hidden;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.1);
  cursor: pointer;
  transition:
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

.product-card:hover {
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.18);
  transform: translateY(-4px);
}

.product-image {
  width: 100%;
  height: 220px;
  object-fit: cover;
}

.product-info {
  padding: 1rem;
}

.product-info h3 {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  font-weight: 500;
}

.product-info p {
  margin: 0;
  color: #374151;
  font-size: 0.875rem;
}

/* ================= FOOTER ================= */

.footer {
  background-color: var(--color-footer-bg);
  color: var(--color-footer-text);
  padding: 3rem 0 1.5rem;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.footer-logo {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem;
}

.footer-col h4 {
  margin: 0 0 1rem;
  font-size: 1rem;
  font-weight: 600;
}

.footer-col p {
  font-size: 0.875rem;
  opacity: 0.9;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-col li {
  margin-bottom: 0.5rem;
}

.footer-col a {
  color: var(--color-footer-text);
  text-decoration: none;
  font-size: 0.875rem;
  opacity: 0.9;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 1;
  text-decoration: underline;
}

.footer-socials {
  display: flex;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.footer-socials a {
  font-size: 0.875rem;
  text-decoration: none;
  color: var(--color-footer-text);
  opacity: 0.9;
}

.footer-socials a:hover {
  opacity: 1;
}

.footer-note {
  font-size: 0.875rem;
  opacity: 0.9;
}

.footer-bottom {
  border-top: 1px solid rgba(249, 250, 251, 0.2);
  margin-top: 2rem;
  padding-top: 1.25rem;
  text-align: center;
  font-size: 0.875rem;
  opacity: 0.85;
}

/* ================= WHATSAPP BUTTON ================= */

.whatsapp-button {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  width: 56px;
  height: 56px;
  border-radius: 999px;
  background-color: var(--color-green);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  box-shadow: 0 12px 25px rgba(22, 163, 74, 0.7);
  transition:
    background-color 0.2s ease,
    transform 0.1s ease,
    box-shadow 0.2s ease;
  z-index: 60;
}

.whatsapp-button:hover {
  background-color: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 18px 35px rgba(22, 163, 74, 0.8);
}

.whatsapp-icon {
  width: 24px;
  height: 24px;
}

/* ================= GENERIC BUTTONS ================= */

.btn-primary,
.btn-outline,
.btn-light,
.btn-dark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.btn-primary {
  background-color: var(--color-dark);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: #000000;
}

.btn-outline {
  background-color: transparent;
  color: var(--color-dark);
  border-color: var(--color-dark);
}

.btn-outline:hover {
  background-color: #e5e7eb;
}

.btn-light {
  background-color: #f3f4f6;
  color: #111827;
}

.btn-light:hover {
  background-color: #e5e7eb;
}

.btn-dark {
  background-color: #000000;
  color: #ffffff;
}

.btn-dark:hover {
  background-color: #111827;
}





/* ================= PREMIUM SINGLE PRODUCT PAGE ================= */

.mat4u-product-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 20px;
}

/* GRID */
.mat4u-product-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
}

@media (max-width: 768px) {
  .mat4u-product-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

/* ================= IMAGE SECTION ================= */

.mat4u-product-image {
  position: relative;
}

.mat4u-product-image img {
  width: 100%;
  border-radius: 18px;
  background: #f9fafb;
}

/* ================= DETAILS SECTION ================= */

.mat4u-product-details {
  display: flex;
  flex-direction: column;
}

/* Title */
.product-title {
  font-size: 36px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 14px;
}

/* Price */
.product-price {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* Tax note */
.tax-note {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 28px;
}

/* ================= CART AREA ================= */

.mat4u-cart-box {
  margin-bottom: 40px;
}

.mat4u-cart-box form.cart {
  display: flex;
  gap: 14px;
  align-items: center;
}

/* Quantity */
.mat4u-cart-box .quantity input {
  width: 70px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  font-size: 14px;
  text-align: center;
}

/* Add to cart */
.single_add_to_cart_button {
  flex: 1;
  background: #000000;
  color: #ffffff;
  padding: 14px 24px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
}

.single_add_to_cart_button:hover {
  background: #111827;
  transform: translateY(-1px);
}

/* ================= DESCRIPTION ================= */

.product-description,
.product-long-description {
  border-top: 1px solid #e5e7eb;
  padding-top: 28px;
  margin-top: 28px;
}

.product-description h3,
.product-long-description h3 {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}

.product-description p,
.product-long-description p {
  font-size: 15px;
  line-height: 1.7;
  color: #374151;
}

/* cart page */
.wc-block-cart {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    margin-top: 50px !important;
}

.page-id-7 .wc-block-components-product-name {
    color: black;
    text-decoration: none;
    font-weight: bold;
} 

.page-id-7 .wc-block-components-button__text {
    color: #FFF;
    font-weight: bold;
}

.page-id-7 .wc-block-cart__submit-button {
    text-decoration: none !important;
    background: black;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.page-id-7 .wc-block-cart__submit-button:hover {
    transform: scale(1.04);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

@media (max-width: 768px){
    .page-id-7 .wc-block-cart {
        padding: 18px;
    }
}

/* checkout page */
.page-id-8 .wc-block-checkout {
    padding: 25px;
}

/* order received page */
.woocommerce-order {
    padding: 25px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.woocommerce-table--order-details {
    max-width: 900px;
}

.woocommerce-customer-details {
    max-width: 900px;
}

.woocommerce-order-details {
    display: block;
}

.woocommerce-customer-details {
    display: block;
}

/* ================= MOBILE POLISH ================= */

@media (max-width: 768px) {
  .product-title {
    font-size: 28px;
  }

  .product-price {
    font-size: 22px;
  }

  .single_add_to_cart_button {
    width: 100%;
  }
}




/* === left promo box on mobile === */
@media (max-width: 767px) {
  .content-section-left .content-box {
    left: 50% !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    width: calc(100% - 3rem) !important;
  }
}


