/* ============================================================
   Silk Sert Confecções - Custom Styles
   ============================================================ */

:root {
  --color-primary:    #1a3a6b;
  --color-primary-dark: #112850;
  --color-secondary:  #e65c00;
  --color-secondary-dark: #c24f00;
  --color-accent:     #f8f9fa;
  --color-text:       #333;
  --color-muted:      #6c757d;
  --font-base:        'Inter', sans-serif;
  --border-radius:    0.5rem;
  --transition:       0.25s ease;
}

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

body {
  font-family: var(--font-base);
  color: var(--color-text);
  background: #fff;
  line-height: 1.65;
}

a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-secondary); }

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

/* ---- Buttons ---- */
.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}
.btn-secondary-brand {
  background-color: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #fff;
}
.btn-secondary-brand:hover {
  background-color: var(--color-secondary-dark);
  border-color: var(--color-secondary-dark);
  color: #fff;
}

/* ---- Navbar ---- */
.navbar-brand-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff !important;
  letter-spacing: -0.3px;
}
.navbar-brand-text span { color: var(--color-secondary); }

.site-navbar { background-color: var(--color-primary) !important; }
.site-navbar .nav-link { color: rgba(255,255,255,.85) !important; font-weight: 500; transition: color var(--transition); padding: .5rem .9rem; }
.site-navbar .nav-link:hover, .site-navbar .nav-link.active { color: #fff !important; }
.site-navbar .nav-link.active { border-bottom: 2px solid var(--color-secondary); }

/* ---- Hero ---- */
.hero-section {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d2045 60%, #1a3a6b 100%);
  color: #fff;
  padding: 100px 0 80px;
  position: relative;
  overflow: hidden;
}
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-section h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.2; }
.hero-badge { background: rgba(230,92,0,.2); border: 1px solid rgba(230,92,0,.4); color: var(--color-secondary); font-size: .8rem; letter-spacing: .5px; }
.hero-stat-card { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: var(--border-radius); backdrop-filter: blur(4px); }

/* ---- Section Headings ---- */
.section-title { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; color: var(--color-primary); }
.section-subtitle { color: var(--color-muted); max-width: 600px; }
.section-line { width: 48px; height: 3px; background: var(--color-secondary); border-radius: 2px; }
.bg-primary-soft { background-color: rgba(26,58,107,.1); }

/* ---- Product Cards ---- */
.product-card { border-radius: var(--border-radius); transition: box-shadow var(--transition), transform var(--transition); overflow: hidden; }
.product-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.12) !important; transform: translateY(-3px); }
.product-card .card-img-top { height: 220px; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .card-img-top { transform: scale(1.04); }
.product-card .img-wrapper { overflow: hidden; }
.product-card .category-badge { font-size: .7rem; letter-spacing: .4px; }
.product-card .card-title { font-weight: 600; font-size: .95rem; }

/* ---- Service Cards ---- */
.service-card { border-radius: var(--border-radius); transition: box-shadow var(--transition), transform var(--transition); }
.service-card:hover { box-shadow: 0 8px 30px rgba(0,0,0,.12) !important; transform: translateY(-3px); }

/* ---- Page Hero (internal pages) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, #0d2045 100%);
  color: #fff;
  padding: 60px 0 50px;
}
.page-hero .breadcrumb-item a { color: rgba(255,255,255,.7); }
.page-hero .breadcrumb-item.active { color: rgba(255,255,255,.9); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.5); }
.page-hero-title { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 700; margin-bottom: .5rem; }
.page-hero-subtitle { opacity: .8; font-size: 1rem; }

/* ---- Stats Bar ---- */
.stats-bar { background: var(--color-primary); color: #fff; padding: 30px 0; }
.stats-bar .stat-number { font-size: 2rem; font-weight: 800; color: var(--color-secondary); }
.stats-bar .stat-label { font-size: .85rem; opacity: .85; }

/* ---- Category Cards ---- */
.cat-card { position: relative; border-radius: var(--border-radius); overflow: hidden; cursor: pointer; }
.cat-card img { height: 180px; width: 100%; object-fit: cover; transition: transform .4s ease; }
.cat-card:hover img { transform: scale(1.06); }
.cat-card .cat-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.7) 0%, transparent 55%); display: flex; align-items: flex-end; padding: 1rem; }
.cat-card .cat-name { color: #fff; font-weight: 600; font-size: .95rem; }

/* ---- Quote Cart ---- */
.cart-icon-btn { position: relative; }
.cart-badge { position: absolute; top: -6px; right: -8px; font-size: .65rem; min-width: 18px; height: 18px; padding: 0 4px; line-height: 18px; border-radius: 9px; background: var(--color-secondary); color: #fff; text-align: center; }

/* ---- WhatsApp Float Button ---- */
.whatsapp-float {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 9999;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.8rem;
  box-shadow: 0 4px 16px rgba(37,211,102,.5);
  transition: transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 24px rgba(37,211,102,.6); color: #fff; }

/* ---- Footer ---- */
.site-footer { background: var(--color-primary); color: rgba(255,255,255,.8); font-size: .88rem; }
.site-footer h5, .site-footer h6 { color: #fff; font-weight: 700; }
.site-footer a { color: rgba(255,255,255,.7); transition: color var(--transition); }
.site-footer a:hover { color: #fff; }
.site-footer .footer-divider { border-color: rgba(255,255,255,.15); }
.site-footer-bottom { background: rgba(0,0,0,.2); }

/* ---- Breadcrumb ---- */
.breadcrumb { margin-bottom: .5rem; }
.breadcrumb-item a { text-decoration: none; }

/* ---- Admin Layout ---- */
.admin-sidebar {
  width: 250px;
  min-height: 100vh;
  background: #1e2a3b;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: 1000;
  transition: transform .3s ease;
}
.admin-sidebar .sidebar-brand { padding: 1.25rem 1.5rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.admin-sidebar .sidebar-brand h6 { color: #fff; font-weight: 700; font-size: 1rem; margin: 0; }
.admin-sidebar .sidebar-brand small { color: rgba(255,255,255,.5); font-size: .7rem; }
.admin-sidebar .nav-link { color: rgba(255,255,255,.7); padding: .6rem 1.5rem; border-radius: 0; font-size: .875rem; transition: all .2s; display: flex; align-items: center; gap: .6rem; }
.admin-sidebar .nav-link:hover, .admin-sidebar .nav-link.active { color: #fff; background: rgba(255,255,255,.08); border-left: 3px solid var(--color-secondary); padding-left: calc(1.5rem - 3px); }
.admin-sidebar .nav-section { color: rgba(255,255,255,.35); font-size: .7rem; letter-spacing: 1px; text-transform: uppercase; padding: 1rem 1.5rem .3rem; }

.admin-main { margin-left: 250px; min-height: 100vh; background: #f5f6fa; }
.admin-topbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: .8rem 1.5rem; position: sticky; top: 0; z-index: 999; }

@media (max-width: 991.98px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.show { transform: translateX(0); }
  .admin-main { margin-left: 0; }
  .sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 999; }
  .sidebar-overlay.show { display: block; }
}

.admin-content { padding: 1.5rem; }

/* ---- DataTables tweaks ---- */
.dataTables_wrapper .dataTables_filter input { border-radius: var(--border-radius); border: 1px solid #dee2e6; padding: .375rem .75rem; }
.dataTables_wrapper .dataTables_length select { border-radius: var(--border-radius); border: 1px solid #dee2e6; }
table.dataTable thead th { background: #f8f9fa; border-bottom: 2px solid #dee2e6 !important; font-weight: 600; font-size: .85rem; }

/* ---- Forms ---- */
.form-label { font-weight: 500; font-size: .875rem; color: #444; }
.form-control:focus, .form-select:focus { border-color: var(--color-primary); box-shadow: 0 0 0 .2rem rgba(26,58,107,.2); }
.required-mark { color: var(--color-secondary); }

/* ---- Badges ---- */
.badge-primary-soft { background: rgba(26,58,107,.12); color: var(--color-primary); }
.badge-secondary-soft { background: rgba(230,92,0,.12); color: var(--color-secondary); }

/* ---- Catalog Filters Sidebar ---- */
.filter-sidebar .filter-section { border-bottom: 1px solid #eee; padding-bottom: 1rem; margin-bottom: 1rem; }
.filter-sidebar .filter-section:last-child { border-bottom: none; }
.filter-sidebar h6 { font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .5px; color: var(--color-primary); }

/* ---- Product Detail ---- */
.product-thumb { width: 70px; height: 70px; object-fit: cover; border-radius: .375rem; cursor: pointer; border: 2px solid transparent; transition: border-color .2s; }
.product-thumb.active, .product-thumb:hover { border-color: var(--color-primary); }
.product-carousel .carousel-item img { max-height: 460px; object-fit: contain; border-radius: var(--border-radius); background: #f8f9fa; }

/* ---- Quote Cart ---- */
.cart-item-img { width: 52px; height: 52px; object-fit: cover; border-radius: .375rem; }
.cart-table td { vertical-align: middle; }
.customer-form-card { background: #fff; border: 1px solid #e5e7eb; border-radius: var(--border-radius); padding: 1.5rem; }

/* ---- Blog ---- */
.post-card { border-radius: var(--border-radius); overflow: hidden; transition: box-shadow .25s, transform .25s; }
.post-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.1) !important; transform: translateY(-3px); }
.post-card .card-img-top { height: 200px; object-fit: cover; }
.post-date { font-size: .8rem; color: var(--color-muted); }
.post-content img { max-width: 100%; border-radius: var(--border-radius); }
.post-content h2, .post-content h3 { color: var(--color-primary); }
.post-content p { margin-bottom: 1.2rem; }

/* ---- Tabs (product detail) ---- */
.nav-tabs .nav-link { color: var(--color-muted); font-weight: 500; }
.nav-tabs .nav-link.active { color: var(--color-primary); font-weight: 600; border-bottom-color: var(--color-primary); }

/* ---- Utilities ---- */
.text-primary-brand { color: var(--color-primary) !important; }
.text-secondary-brand { color: var(--color-secondary) !important; }
.bg-primary-brand { background-color: var(--color-primary) !important; }
.bg-secondary-brand { background-color: var(--color-secondary) !important; }
.border-primary-brand { border-color: var(--color-primary) !important; }
.rounded-custom { border-radius: var(--border-radius) !important; }
.shadow-soft { box-shadow: 0 2px 12px rgba(0,0,0,.08) !important; }

/* ---- Responsive ---- */
@media (max-width: 767.98px) {
  .hero-section { padding: 60px 0 50px; }
  .hero-section h1 { font-size: 1.7rem; }
  .whatsapp-float { width: 52px; height: 52px; font-size: 1.5rem; right: 18px; bottom: 18px; }
  .stats-bar .stat-number { font-size: 1.5rem; }
}

/* ---- Animations ---- */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
.animate-fadeInUp { animation: fadeInUp .5s ease forwards; }
