:root {
  --color-primary:   #ff6b35;
  --color-primary-d: #e55a25;  /* darker hover */
  --color-primary-l: #fff1eb;  /* light tint bg */
  --color-secondary: #06b6d4;  /* cyan success accent */
  --color-warning:   #f59e0b;
  --color-danger:    #ef4444;
  --color-dark:      #111827;
  --color-gray:      #6b7280;
  --color-border:    #e5e7eb;
  --radius:          0.5rem;
  --radius-lg:       0.75rem;
  --shadow-card:     0 2px 12px rgba(0,0,0,.07);
  --shadow-hover:    0 8px 24px rgba(255,107,53,.18);
}

/* ---------- Global Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Manrope', system-ui, -apple-system, sans-serif;
  color: #1f2937;
  background-color: #f9fafb;
  line-height: 1.6;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Utilities ---------- */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }
@media (max-width: 480px) {
  .container { padding: 0 .75rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  padding: .55rem 1.4rem;
  font-family: inherit; font-weight: 600; font-size: .9rem;
  border-radius: 9999px; border: 2px solid transparent;
  cursor: pointer; transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-primary); color: #fff;
  border-color: var(--color-primary);
}
.btn-primary:hover {
  background: transparent; color: var(--color-primary);
}
.btn-outline {
  background: transparent; color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-outline:hover {
  background: var(--color-primary); color: #fff;
}
.btn-white {
  background: #fff; color: var(--color-primary);
  border-color: #fff;
}
.btn-white:hover {
  background: transparent; color: #fff;
}
.btn-dark {
  background: var(--color-dark); color: #fff;
  border-color: var(--color-dark);
}
.btn-danger {
  background: var(--color-danger); color: #fff;
  border-color: var(--color-danger);
}
.btn-sm { padding: .35rem 1rem; font-size: .82rem; }
.btn-lg { padding: .75rem 2rem; font-size: 1rem; }
.btn-full { width: 100%; }

/* ---------- Cards ---------- */
.card {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.card-body { padding: 1.5rem; }
.card:hover { box-shadow: var(--shadow-hover); }

/* ---------- Form Controls ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block; font-weight: 600; font-size: .875rem;
  color: #374151; margin-bottom: .35rem;
}
.form-control {
  width: 100%;
  padding: .6rem 1rem;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit; font-size: .9rem; color: #1f2937;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
select.form-control, select:not([multiple]) {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.75rem;
}
.form-control:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255,107,53,.15);
}
.form-control-round { border-radius: 9999px; padding-left: 1.25rem; }
.form-error { font-size: .8rem; color: var(--color-danger); margin-top: .3rem; }

.errorlist {
  list-style: none; padding: 0; margin: 0;
}
.errorlist li {
  font-size: .8rem; color: var(--color-danger);
  margin-top: .25rem;
}

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .65rem; border-radius: 9999px;
  font-size: .75rem; font-weight: 700; letter-spacing: .02em;
}
.badge-primary { background: var(--color-primary-l); color: var(--color-primary); }
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #b45309; }
.badge-danger  { background: #fef2f2; color: var(--color-danger); }
.badge-dark    { background: #1f2937; color: #fff; }
.badge-cyan    { background: #ecfeff; color: #0e7490; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .85rem 1.1rem; border-radius: var(--radius);
  font-size: .9rem; font-weight: 500;
  margin-bottom: 1rem;
}
.alert-success { background: #ecfdf5; color: #065f46; border-left: 4px solid #10b981; }
.alert-warning { background: #fffbeb; color: #92400e; border-left: 4px solid #f59e0b; }
.alert-error   { background: #fef2f2; color: #991b1b; border-left: 4px solid #ef4444; }
.alert-info    { background: #ecfeff; color: #164e63; border-left: 4px solid #06b6d4; }

/* ---------- Tags ---------- */
.tag {
  display: inline-block;
  padding: .15rem .6rem; border-radius: 4px;
  font-size: .78rem; font-weight: 600;
}
.tag-orange { background: var(--color-primary-l); color: var(--color-primary); }
.tag-cyan   { background: #ecfeff; color: #0891b2; }

/* ---------- Header ---------- */
.sk-header {
  position: sticky; top: 0; z-index: 50;
  background: #111827;
  box-shadow: 0 2px 12px rgba(0,0,0,.25);
}
.sk-header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: .85rem 1.25rem; max-width: 1280px; margin: 0 auto;
}
.sk-logo {
  font-size: 1.5rem; font-weight: 800; color: #fff;
  display: flex; align-items: center; gap: .5rem;
}
.sk-logo-icon {
  width: 2rem; height: 2rem; border-radius: .4rem;
  background: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: #fff;
}
.sk-logo span.accent { color: var(--color-primary); }

.sk-search {
  flex: 1; max-width: 420px; margin: 0 1.5rem;
  display: flex; border-radius: 9999px; overflow: hidden;
  border: 1.5px solid #374151; background: #1f2937;
}
.sk-search input {
  flex: 1; background: transparent; border: none; outline: none;
  color: #fff; padding: .5rem 1rem; font-family: inherit; font-size: .875rem;
}
.sk-search input::placeholder { color: #9ca3af; }
.sk-search button {
  background: var(--color-primary); border: none; cursor: pointer;
  color: #fff; padding: .5rem 1rem; font-size: .85rem;
  transition: background .2s;
}
.sk-search button:hover { background: var(--color-primary-d); }

.sk-nav { display: flex; align-items: center; gap: 1.5rem; }
.sk-nav a {
  color: #d1d5db; font-weight: 600; font-size: .875rem;
  transition: color .2s;
}
.sk-nav a:hover, .sk-nav a.active { color: var(--color-primary); }

.sk-nav-actions { display: flex; align-items: center; gap: .75rem; }

.sk-cart-btn {
  position: relative; color: #d1d5db;
  display: flex; align-items: center; gap: .3rem;
  font-weight: 600; font-size: .875rem;
  transition: color .2s;
}
.sk-cart-btn:hover { color: var(--color-primary); }
.sk-cart-count {
  position: absolute; top: -8px; right: -10px;
  background: var(--color-primary); color: #fff;
  font-size: .65rem; font-weight: 700;
  width: 1.1rem; height: 1.1rem; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}

/* Mobile nav */
.sk-mobile-nav {
  display: none; flex-direction: column; gap: .25rem;
  background: #1f2937; padding: 1rem 1.25rem;
  max-height: calc(100dvh - 70px); overflow-y: auto;
}
.sk-mobile-nav.open { display: flex; }
.sk-mobile-nav a {
  color: #d1d5db; font-weight: 600; padding: .65rem 0;
  border-bottom: 1px solid #374151; font-size: .95rem;
}
.sk-mobile-nav a:last-child { border-bottom: none; }
@media (max-width: 480px) {
  .sk-header-inner { padding: .65rem .75rem; }
  .sk-logo { font-size: 1.2rem; }
  .sk-logo img { height: 2rem !important; }
}

/* ---------- Hero Sections ---------- */
.hero-gradient {
  background: #e55a25;
  color: #fff; padding: 3rem 1.25rem;
}
@media (max-width: 480px) {
  .hero-gradient { padding: 1.5rem .75rem; }
}
.hero-gradient-soft {
  background: #fef3c7;
  padding: 2rem 1.25rem;
}

/* ---------- Stat Cards ---------- */
.stat-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-card);
  display: flex; align-items: center; gap: 1rem;
}
.stat-icon {
  width: 3rem; height: 3rem; border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; flex-shrink: 0;
}
.stat-icon-orange { background: #fff7ed; color: var(--color-primary); }
.stat-icon-cyan   { background: #ecfeff; color: #0891b2; }
.stat-icon-green  { background: #ecfdf5; color: #059669; }
.stat-icon-yellow { background: #fffbeb; color: #d97706; }
.stat-icon-purple { background: #f5f3ff; color: #7c3aed; }

.stat-value { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.stat-label { font-size: .8rem; color: var(--color-gray); font-weight: 600; margin-top: .15rem; }

/* ---------- Product Cards ---------- */
.product-card {
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.product-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-hover);
}
.product-card-img {
  position: relative; overflow: hidden;
  aspect-ratio: 4/3;
}
.product-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .35s;
}
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img .new-badge {
  position: absolute; top: .5rem; left: .5rem;
}
.product-card-body { padding: .875rem; flex: 1; display: flex; flex-direction: column; }
.product-card-name {
  font-weight: 700; font-size: .9rem; margin-bottom: .25rem;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.product-card-shop { font-size: .75rem; color: var(--color-gray); margin-bottom: .35rem; }
.product-card-price {
  color: var(--color-primary); font-size: 1rem; font-weight: 800;
  margin-bottom: .5rem;
}
.product-card-actions { margin-top: auto; display: flex; gap: .35rem; }
.product-card-actions .btn { flex: 1; font-size: .78rem; padding: .3rem .6rem; }

@media (max-width: 480px) {
  .product-card-body { padding: .6rem; }
  .product-card-name { font-size: .8rem; }
  .product-card-price { font-size: .9rem; }
  .product-card-shop { font-size: .7rem; }
  .product-card-actions .btn { font-size: .7rem; padding: .25rem .5rem; }
}

/* ---------- Product Grid ---------- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}
@media (max-width: 768px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .625rem; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: repeat(2, 1fr); gap: .5rem; }
}
@media (max-width: 380px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* ---------- Filter Sidebar ---------- */
.filter-sidebar {
  background: #fff; border-radius: var(--radius-lg);
  padding: 1.25rem; box-shadow: var(--shadow-card);
  position: sticky; top: 80px;
}
@media (max-width: 1024px) {
  .filter-sidebar { position: static; }
}
.filter-sidebar h3 {
  font-weight: 700; font-size: 1rem; color: #374151;
  margin-bottom: 1rem; padding-bottom: .5rem;
  border-bottom: 2px solid var(--color-primary-l);
}
.filter-group { margin-bottom: 1.25rem; }
.filter-group label { font-size: .875rem; font-weight: 600; color: #374151; margin-bottom: .4rem; display: block; }

/* ---------- Tables ---------- */
.sk-table { width: 100%; border-collapse: collapse; }
.sk-table th {
  background: #f3f4f6; text-align: left;
  padding: .75rem 1rem; font-size: .8rem; font-weight: 700;
  color: #6b7280; text-transform: uppercase; letter-spacing: .05em;
}
.sk-table td { padding: .75rem 1rem; border-bottom: 1px solid #f3f4f6; font-size: .875rem; }
.sk-table tbody tr:hover { background: #fafafa; }

/* ---------- Image Gallery ---------- */
.gallery-main {
  aspect-ratio: 4/3; overflow: hidden; border-radius: var(--radius-lg);
  background: #f3f4f6;
}
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs { display: flex; gap: .5rem; margin-top: .5rem; flex-wrap: wrap; }
.gallery-thumb {
  width: 70px; height: 70px; border-radius: var(--radius);
  overflow: hidden; border: 2px solid transparent;
  cursor: pointer; transition: border-color .2s;
}
.gallery-thumb.active { border-color: var(--color-primary); }
.gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { display: flex; align-items: center; gap: .5rem; font-size: .85rem; }
.breadcrumb a { color: var(--color-gray); }
.breadcrumb a:hover { color: var(--color-primary); }
.breadcrumb .sep { color: #d1d5db; }

/* ---------- Messages Thread ---------- */
.msg-bubble {
  padding: .75rem 1rem; border-radius: var(--radius-lg);
  max-width: 85%; margin-bottom: .75rem; font-size: .875rem;
}
.msg-shop    { background: var(--color-primary-l); color: #7c2d12; align-self: flex-start; }
.msg-client  { background: #eff6ff; color: #1e3a8a; align-self: flex-end; margin-left: auto; }
.msg-thread  { display: flex; flex-direction: column; }

/* ---------- Dashboard Sections ---------- */
.dash-section { background: #fff; border-radius: var(--radius-lg); padding: 1.25rem; box-shadow: var(--shadow-card); margin-bottom: 1.5rem; }
.dash-section h2 { font-size: 1.05rem; font-weight: 700; color: #1f2937; margin-bottom: 1rem; display: flex; align-items: center; gap: .5rem; }

/* ---------- Page Loader ---------- */
#page-loader { animation: fadeIn .2s ease-out; }
#page-loader .fa-spinner { animation: spin 1s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ---------- Footer ---------- */
.sk-footer {
  background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
  color: #9ca3af;
  padding: 4rem 1.25rem 0;
  margin-top: 4rem;
}
.sk-footer-inner {
  max-width: 1280px; margin: 0 auto;
}
.sk-footer-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
@media (max-width: 768px) {
  .sk-footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .sk-footer-grid { grid-template-columns: 1fr; }
}
.sk-footer h4 { color: #fff; font-weight: 700; margin-bottom: 1rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; }
.sk-footer a { color: #9ca3af; font-size: .875rem; transition: color .2s; }
.sk-footer a:hover { color: var(--color-primary); }
.sk-footer p { font-size: .875rem; line-height: 1.6; }
.sk-footer .nav-link { display: block; margin-bottom: .55rem; }
.sk-footer .social-link {
  display: inline-flex; align-items: center; gap: .5rem;
  color: #9ca3af; font-size: .875rem; margin-bottom: .55rem; transition: color .2s;
}
.sk-footer .social-link:hover { color: var(--color-primary); }
.sk-footer .social-link i { width: 1rem; text-align: center; opacity: .7; transition: opacity .2s; font-size: .9rem; }
.sk-footer .social-link:hover i { opacity: 1; }
.sk-footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.25rem 0;
  font-size: .8rem;
}
@media (max-width: 480px) {
  .sk-footer-bottom { flex-direction: column; gap: .5rem; text-align: center; }
}
.sk-footer-bottom p { color: #6b7280; font-size: .8rem; }

/* ---------- Cart Table ---------- */
.cart-table { width: 100%; border-collapse: collapse; }
.cart-table th {
  padding: .75rem; text-align: left; font-size: .8rem; font-weight: 700;
  color: #6b7280; text-transform: uppercase; border-bottom: 2px solid #f3f4f6;
}
.cart-table td { padding: 1rem .75rem; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.cart-qty { width: 70px; text-align: center; border: 1.5px solid #e5e7eb; border-radius: .375rem; padding: .35rem .5rem; }

/* ---------- Page header strip ---------- */
.page-header {
  background: linear-gradient(135deg, #111827, #1f2937);
  color: #fff; padding: 2.5rem 1.25rem;
}

/* ---------- Smooth scroll & focus ---------- */
html { scroll-behavior: smooth; }
*:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; border-radius: 4px; }

/* ---------- Animations ---------- */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s ease-out; }
.products-grid > .product-card { animation: fadeIn .3s ease-out both; }
.products-grid > .product-card:nth-child(1) { animation-delay: 0s; }
.products-grid > .product-card:nth-child(2) { animation-delay: .05s; }
.products-grid > .product-card:nth-child(3) { animation-delay: .1s; }
.products-grid > .product-card:nth-child(4) { animation-delay: .15s; }
.products-grid > .product-card:nth-child(5) { animation-delay: .2s; }
.products-grid > .product-card:nth-child(6) { animation-delay: .25s; }
.products-grid > .product-card:nth-child(7) { animation-delay: .3s; }
.products-grid > .product-card:nth-child(8) { animation-delay: .35s; }

/* ---------- Responsive helpers ---------- */
@media (max-width: 1024px) {
  .sk-search { display: none; }
}
@media (max-width: 768px) {
  .sk-nav { display: none; }
  .sk-nav-actions .btn-primary { display: none; }
}
@media (max-width: 480px) {
  .sk-footer { padding: 2.5rem .75rem 0; margin-top: 2rem; }
  .sk-footer-grid { gap: 1.5rem; }
  .gallery-thumb { width: 55px; height: 55px; }
  .breadcrumb { font-size: .75rem; flex-wrap: wrap; }
  .stat-card { padding: .875rem; }
  .stat-value { font-size: 1.35rem; }
}
