/* ===== ColorMart Global Styles ===== */
:root {
  --primary: #8e0b41;
  --primary-light: #b80e54;
  --primary-dark: #6b0831;
  --secondary: #d61a5e;
  --secondary-light: #e83e7a;
  --bg-primary: #fce1eb;
  --bg-light: #fff5f8;
  --bg-white: #ffffff;
  --bg-dark: #1a1a1a;
  --accent: #d4a373;
  --accent-light: #e8c9a0;
  --neutral-900: #1a1a1a;
  --neutral-800: #333333;
  --neutral-700: #4a4a4a;
  --neutral-600: #666666;
  --neutral-500: #808080;
  --neutral-400: #999999;
  --neutral-300: #b3b3b3;
  --neutral-200: #cccccc;
  --neutral-100: #e5e5e5;
  --neutral-50: #f5f5f5;
  --success: #10b981;
  --success-light: #d1fae5;
  --error: #ef4444;
  --error-light: #fee2e2;
  --warning: #f59e0b;
  --info: #3b82f6;
  --font-primary: "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, "Times New Roman", serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 12px 48px rgba(0, 0, 0, 0.15);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 50px;
  --transition: 0.3s ease;
  --header-height: 72px;
  --container-max: 1280px;
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  font-family: var(--font-primary);
  font-size: 16px;
  line-height: 1.6;
  color: var(--neutral-800);
  background: var(--bg-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

body.menu-open {
  overflow: hidden;
}

h1,
h2,
h3,
h4 {
  font-family: var(--font-heading);
  line-height: 1.3;
  color: var(--neutral-900);
}
h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 2rem;
}
h3 {
  font-size: 1.5rem;
}
h4 {
  font-size: 1.2rem;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover {
  color: var(--primary-light);
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== HEADER ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  border-bottom: 1px solid rgba(142, 11, 65, 0.08);
  transition: all var(--transition);
  height: var(--header-height);
  width: 100%;
}
.site-header.scrolled {
  box-shadow: var(--shadow-md);
}

.header-container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
}
.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Professional Logo */
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  flex-shrink: 0;
}
.logo-img-wrap {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  background: white;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(142, 11, 65, 0.15);
  transition: all var(--transition);
}
.logo-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 9px;
}
.logo:hover .logo-img-wrap {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(142, 11, 65, 0.25);
}
.logo:hover {
  color: var(--primary-dark);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.main-nav a {
  padding: 8px 18px;
  color: var(--neutral-700);
  font-weight: 500;
  font-size: 0.9rem;
  text-decoration: none;
  border-radius: var(--radius-full);
  transition: all var(--transition);
  white-space: nowrap;
}
.main-nav a:hover,
.main-nav a.active {
  color: var(--primary);
  background: var(--bg-primary);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.header-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: var(--neutral-700);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all var(--transition);
  background: none;
  border: none;
  cursor: pointer;
}
.header-icon:hover {
  background: var(--bg-primary);
  color: var(--primary);
}

.cart-count {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  background: var(--secondary);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 10px;
  display: none;
  align-items: center;
  justify-content: center;
}

/* Mobile Menu */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.mobile-menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--neutral-800);
  border-radius: 2px;
  transition: all var(--transition);
}
.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.mobile-menu-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bg-dark);
  color: var(--neutral-300);
  position: relative;
  width: 100%;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary),
    var(--accent)
  );
}

.footer-main {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 50px 24px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 30px;
}

/* Footer Logo */
.footer-logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.footer-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  background: white;
  padding: 3px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}
.footer-logo-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 11px;
}
.footer-brand h4 {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.3rem;
  margin-bottom: 0;
}
.footer-brand p {
  color: var(--neutral-400);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 16px;
}

.footer-social {
  display: flex;
  gap: 10px;
}
.footer-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: white;
  font-size: 0.95rem;
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--primary);
  transform: translateY(-3px);
}

.footer-section h4 {
  color: white;
  font-family: var(--font-primary);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  color: var(--neutral-400);
  font-size: 0.9rem;
  text-decoration: none;
  transition: all var(--transition);
}
.footer-links a:hover {
  color: white;
  padding-left: 6px;
}

.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--neutral-400);
  font-size: 0.85rem;
}
.footer-contact i {
  color: var(--accent);
  margin-top: 3px;
  flex-shrink: 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 20px 0;
}
.footer-bottom .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--neutral-500);
  flex-wrap: wrap;
  gap: 10px;
}

.footer-branding {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--neutral-300);
}
.footer-branding .cm-name {
  color: white;
  font-family: var(--font-heading);
  font-size: 1rem;
}

.footer-credit {
  font-size: 0.72rem;
  color: var(--neutral-500);
}
.footer-credit a {
  color: var(--neutral-500);
  text-decoration: none;
  transition: color var(--transition);
}
.footer-credit a:hover {
  color: var(--neutral-300);
}

.footer-bottom-links {
  display: flex;
  gap: 20px;
}
.footer-bottom-links a {
  color: var(--neutral-500);
  text-decoration: none;
  font-size: 0.82rem;
  transition: color var(--transition);
}
.footer-bottom-links a:hover {
  color: white;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  font-family: var(--font-primary);
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(142, 11, 65, 0.35);
  color: white;
}
.btn-secondary {
  background: var(--secondary);
  color: white;
}
.btn-secondary:hover {
  background: #b8154a;
  transform: translateY(-2px);
  color: white;
}
.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-2px);
}
.btn-white {
  background: white;
  color: var(--primary);
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-lg {
  padding: 15px 32px;
  font-size: 1rem;
}
.btn-sm {
  padding: 8px 16px;
  font-size: 0.8rem;
}
.btn-block {
  width: 100%;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* ===== CARDS ===== */
.card {
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
  overflow: hidden;
  border: 1px solid var(--neutral-100);
}
.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--neutral-700);
}
.form-control {
  width: 100%;
  padding: 12px 16px;
  background: white;
  border: 2px solid var(--neutral-100);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  color: var(--neutral-800);
  transition: all var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(142, 11, 65, 0.08);
}
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23666' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
  cursor: pointer;
}
textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

/* ===== CONTAINER ===== */
.container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
  width: 100%;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  min-width: 300px;
  max-width: 450px;
  padding: 16px 20px;
  background: white;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--success);
  font-size: 0.9rem;
}
.toast-error {
  border-left-color: var(--error);
}
.toast-warning {
  border-left-color: var(--warning);
}
.toast-close {
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--neutral-400);
  padding: 0 4px;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* ===== SCROLL TO TOP ===== */
.scroll-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.scroll-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-4px);
}

/* ===== SKELETON ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== SECTION ===== */
.section {
  padding: 60px 0;
  width: 100%;
}
.section-header {
  text-align: center;
  margin-bottom: 40px;
}
.section-header h2 {
  font-size: 2rem;
  color: var(--neutral-900);
  margin-bottom: 10px;
}
.section-header p {
  color: var(--neutral-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
  h1 {
    font-size: 2rem;
  }
  h2 {
    font-size: 1.6rem;
  }
  .header-container {
    padding: 0 16px;
  }
  .header-left {
    gap: 0;
  }
  .mobile-menu-toggle {
    display: flex;
    order: -1;
    margin-right: 12px;
  }
  .mobile-menu-overlay {
    display: block;
  }
  .main-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 320px;
    height: 100vh;
    background: white;
    flex-direction: column;
    padding: 80px 24px 24px;
    gap: 4px;
    box-shadow: var(--shadow-xl);
    transition: right 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
  }
  .main-nav.active {
    right: 0;
  }
  .main-nav a {
    width: 100%;
    padding: 14px 16px;
    font-size: 1rem;
  }
  .header-actions {
    margin-left: auto;
  }
  .logo {
    font-size: 1.4rem;
  }
  .logo-img-wrap {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .logo-img-wrap img {
    border-radius: 7px;
  }
  .footer-logo-img {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .footer-main {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .footer-bottom .container {
    flex-direction: column;
    text-align: center;
  }
  .toast {
    left: 16px;
    right: 16px;
    min-width: unset;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 12px;
  }
  .logo {
    font-size: 1.2rem;
  }
  .logo-img-wrap {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .logo-img-wrap img {
    border-radius: 6px;
  }
  .header-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }
  .mobile-menu-toggle {
    padding: 6px;
    margin-right: 8px;
  }
  .mobile-menu-toggle span {
    width: 22px;
  }
  .footer-logo-img {
    width: 36px;
    height: 36px;
    border-radius: 10px;
  }
  .footer-bottom .container {
    gap: 8px;
  }
  .footer-bottom-links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
}
