*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --red:#CC1236; --red-dark:#A80E2B; --red-light:#FEF0F3;
  --navy:#6b7280; --navy-mid:#9ca3af;
  --gray-900:#111827; --gray-700:#374151; --gray-500:#6B7280;
  --gray-300:#D1D5DB; --gray-100:#F3F4F6; --gray-50:#F9FAFB;
  --white:#FFFFFF; --green:#16A34A; --green-bg:#DCFCE7;
  --amber:#D97706;
  --shadow-xs:0 1px 2px rgba(0,0,0,.06);
  --shadow-sm:0 1px 4px rgba(0,0,0,.08);
  --shadow-md:0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:0 12px 40px rgba(0,0,0,.14);
}
#sms-tienda { font-family:'Inter',system-ui,sans-serif; color:var(--gray-900); }

/* HEADER — fondo blanco (era rojo, pedido cambio a blanco) */
#sms-tienda .header { background:var(--white); padding:0 24px; height:64px; display:flex; align-items:center; gap:24px; box-shadow:var(--shadow-sm); border-bottom:1px solid var(--gray-100); }
#sms-tienda .logo { display:flex; align-items:center; gap:10px; cursor:pointer; }
#sms-tienda .logo img { height:42px; width:auto; display:block; }
#sms-tienda .search-wrap { flex:1; max-width:560px; position:relative; }
#sms-tienda .search-wrap input { width:100%; height:40px; border:1.5px solid var(--gray-100); border-radius:8px; padding:0 44px 0 16px; font-size:14px; font-family:inherit; background:var(--gray-50); color:var(--gray-900); outline:none; transition:border-color .15s; }
#sms-tienda .search-wrap input::placeholder { color:var(--gray-500); }
#sms-tienda .search-wrap input:focus { border-color:var(--red); background:var(--white); }
#sms-tienda .search-icon { position:absolute; right:14px; top:50%; transform:translateY(-50%); color:var(--gray-500); pointer-events:none; }
#sms-tienda .header-actions { display:flex; align-items:center; gap:8px; margin-left:auto; }
#sms-tienda .btn-ghost { background:none; border:1.5px solid var(--red); color:var(--red); font-family:inherit; font-size:13px; font-weight:700; padding:0 14px; height:40px; border-radius:8px; cursor:pointer; display:flex; align-items:center; gap:6px; transition:background .15s,color .15s; white-space:nowrap; letter-spacing:.3px; box-sizing:border-box; }
#sms-tienda .btn-ghost:hover { background:var(--red); color:var(--white); }
#sms-tienda .cart-btn { position:relative; background:#6b7280; border:none; border-radius:8px; color:#fff; padding:0 14px; height:40px; font-family:inherit; font-size:13px; font-weight:500; cursor:pointer; display:flex; align-items:center; gap:7px; transition:background .15s; box-sizing:border-box; }
#sms-tienda .cart-btn:hover { background:#9ca3af; }
#sms-tienda .cart-badge { position:absolute; top:-6px; right:-6px; background:var(--red); color:#fff; font-size:10px; font-weight:700; width:18px; height:18px; border-radius:50%; display:flex; align-items:center; justify-content:center; border:2px solid var(--white); }
#sms-tienda .cart-badge.hidden { display:none; }

/* CATEGORIAS */
#sms-tienda .cat-nav { background:var(--white); border-bottom:1px solid var(--gray-100); box-shadow:var(--shadow-xs); }
#sms-tienda .cat-nav-inner { display:flex; align-items:stretch; padding:0 24px; overflow-x:auto; scrollbar-width:none; }
#sms-tienda .cat-nav-inner::-webkit-scrollbar { display:none; }
#sms-tienda .cat-item { position:relative; flex-shrink:0; }
#sms-tienda .cat-btn { background:none; border:none; font-family:inherit; font-size:13px; font-weight:600; color:var(--gray-700); padding:14px 14px; cursor:pointer; display:flex; align-items:center; gap:5px; border-bottom:3px solid transparent; transition:color .15s,border-color .15s; white-space:nowrap; text-transform:uppercase; letter-spacing:.3px; }
#sms-tienda .cat-btn:hover, #sms-tienda .cat-btn.active { color:var(--red); border-color:var(--red); }
#sms-tienda .cat-dropdown { display:none; position:fixed; min-width:200px; background:var(--white); border:1px solid var(--gray-100); border-radius:0 0 10px 10px; box-shadow:var(--shadow-md); z-index:9999; padding:8px 0; }
#sms-tienda .cat-item.open .cat-dropdown { display:block; }
#sms-tienda .cat-dropdown a { display:block; padding:9px 20px; font-size:13.5px; color:var(--gray-700); text-decoration:none; cursor:pointer; transition:background .12s,color .12s; }
#sms-tienda .cat-dropdown a:hover { background:var(--gray-50); color:var(--red); }

/* BREADCRUMB */
#sms-tienda .breadcrumb { padding:14px 24px 0; font-size:12.5px; color:var(--gray-500); display:flex; align-items:center; gap:6px; }
#sms-tienda .breadcrumb a { cursor:pointer; color:var(--gray-500); text-decoration:none; }
#sms-tienda .breadcrumb a:hover { color:var(--red); }

/* HERO BANNER — full width, sin márgenes laterales, sin border-radius */
#sms-tienda .hero-banner {
  margin:20px 0 0;
  background: linear-gradient(100deg,rgba(0,0,0,.82) 0%,rgba(0,0,0,.65) 38%,rgba(0,0,0,.22) 65%,rgba(0,0,0,.04) 100%),
              url('https://tododefabrica.com/wp-content/uploads/2026/07/ELECTRODOMESTICOS.jpeg') center/cover no-repeat;
  min-height:416px;
  display:flex; flex-direction:column;
  position:relative; overflow:hidden;
}
#sms-tienda .hero-body { flex:1; display:flex; align-items:center; padding:48px 48px 32px; }
#sms-tienda .hero-content { position:relative; z-index:1; max-width:440px; border-left:5px solid var(--red); padding-left:28px; }
#sms-tienda .hero-eyebrow { font-size:11px; font-weight:700; letter-spacing:2.5px; text-transform:uppercase; color:rgba(255,255,255,.55); margin-bottom:14px; display:flex; align-items:center; gap:8px; }
#sms-tienda .hero-eyebrow::before { content:''; display:block; width:22px; height:2px; background:var(--red); border-radius:2px; flex-shrink:0; }
#sms-tienda .hero-title { font-size:34px; font-weight:900; color:#fff; line-height:1.15; margin-bottom:0; text-transform:uppercase; letter-spacing:.5px; }
#sms-tienda .hero-title-red { color:var(--red); }
#sms-tienda .hero-divider { width:48px; height:3px; background:var(--red); border-radius:2px; margin:18px 0; }
#sms-tienda .hero-sub { font-size:16px; color:rgba(255,255,255,.78); max-width:380px; line-height:1.6; }
#sms-tienda .hero-steps-bar { display:grid; grid-template-columns:repeat(4,1fr); background:rgba(0,0,0,.65); padding:20px 48px; border-top:1px solid rgba(255,255,255,.12); }
#sms-tienda .hero-step-item { display:flex; align-items:flex-start; gap:12px; padding:4px 24px 4px 0; border-right:1px solid rgba(255,255,255,.15); }
#sms-tienda .hero-step-item:last-child { border-right:none; padding-right:0; }
#sms-tienda .hero-step-num { width:28px; min-width:28px; height:28px; border-radius:50%; background:var(--red); color:#fff; font-weight:700; font-size:13px; display:flex; align-items:center; justify-content:center; }
#sms-tienda .hero-step-text strong { color:#fff; font-size:12.5px; display:block; margin-bottom:3px; font-weight:700; line-height:1.3; }
#sms-tienda .hero-step-text span { color:rgba(255,255,255,.62); font-size:11.5px; line-height:1.4; display:block; }

/* CÓMO FUNCIONA SECTION */
#sms-tienda .como-funciona { background:var(--white); padding:40px 24px; }
#sms-tienda .cf-inner { max-width:1100px; margin:0 auto; }
#sms-tienda .cf-header { text-align:center; margin-bottom:28px; }
#sms-tienda .cf-eyebrow { font-size:11px; font-weight:700; letter-spacing:2px; text-transform:uppercase; color:var(--red); display:block; }
#sms-tienda .cf-title { font-size:22px; font-weight:800; color:var(--gray-900); margin:6px 0 0; }
#sms-tienda .cf-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; }
#sms-tienda .cf-card { background:#fff; border:1px solid #e5e7eb; border-radius:12px; padding:24px 20px; text-align:center; }
#sms-tienda .cf-num { width:40px; height:40px; border-radius:50%; background:var(--red); color:#fff; font-size:16px; font-weight:700; display:flex; align-items:center; justify-content:center; margin:0 auto 14px; }
#sms-tienda .cf-card-title { font-size:14.5px; font-weight:700; color:var(--gray-900); margin:0 0 8px; }
#sms-tienda .cf-card-desc { font-size:13px; color:var(--gray-500); line-height:1.5; margin:0; }

/* LAYOUT */
#sms-tienda .page-body { display:flex; gap:24px; padding:20px 24px 48px; align-items:flex-start; }
#sms-tienda .sidebar { width:240px; flex-shrink:0; }
#sms-tienda .sidebar-card { background:var(--white); border:1px solid var(--gray-100); border-radius:12px; padding:20px; margin-bottom:16px; }
#sms-tienda .sidebar-title { font-size:11px; font-weight:700; color:var(--gray-500); letter-spacing:1px; text-transform:uppercase; margin-bottom:14px; }
#sms-tienda .filter-list { list-style:none; }
#sms-tienda .filter-list li { margin-bottom:2px; }
#sms-tienda .filter-list a { display:flex; align-items:flex-start; justify-content:space-between; padding:7px 10px; border-radius:7px; font-size:13.5px; color:var(--gray-700); text-decoration:none; cursor:pointer; transition:background .12s,color .12s; white-space:normal; line-height:1.35; }
#sms-tienda .filter-list a:hover, #sms-tienda .filter-list a.active { background:var(--red-light); color:var(--red); }
#sms-tienda .filter-list .count { font-size:11px; color:var(--gray-300); }

/* MAIN */
#sms-tienda .main-content { flex:1; min-width:0; }
#sms-tienda .section-header { display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
#sms-tienda .section-title { font-size:18px; font-weight:700; }
#sms-tienda .section-count { font-size:13px; color:var(--gray-500); margin-left:8px; }
#sms-tienda .sort-select { font-family:inherit; font-size:13px; color:var(--gray-700); border:1px solid var(--gray-300); border-radius:7px; padding:6px 30px 6px 10px; background:var(--white); cursor:pointer; appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 10px center; outline:none; }
#sms-tienda .active-cat-chip { display:inline-flex; align-items:center; gap:7px; background:var(--red-light); color:var(--red); font-size:12.5px; font-weight:600; border-radius:20px; padding:5px 12px; margin-bottom:16px; }
#sms-tienda .active-cat-chip button { background:none; border:none; color:var(--red); font-size:14px; cursor:pointer; }

/* PRODUCTOS */
#sms-tienda .product-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:16px; }
#sms-tienda .product-card { background:var(--white); border:1px solid var(--gray-100); border-radius:12px; overflow:hidden; transition:box-shadow .2s,transform .2s; cursor:pointer; display:flex; flex-direction:column; }
#sms-tienda .product-card:hover { box-shadow:var(--shadow-md); transform:translateY(-2px); }
#sms-tienda .product-img { aspect-ratio:1; background:var(--gray-50); display:flex; align-items:center; justify-content:center; position:relative; padding:16px; color:var(--gray-400,#9CA3AF); }
#sms-tienda .product-badge { position:absolute; top:10px; left:10px; background:var(--red); color:#fff; font-size:10px; font-weight:700; padding:3px 7px; border-radius:4px; }
#sms-tienda .badge-green { background:var(--green); }
#sms-tienda .product-info { padding:14px; flex:1; display:flex; flex-direction:column; }
#sms-tienda .product-brand { font-size:10.5px; font-weight:600; color:var(--gray-500); text-transform:uppercase; letter-spacing:.8px; margin-bottom:4px; }
#sms-tienda .product-name { font-size:13.5px; font-weight:600; color:var(--gray-900); line-height:1.35; margin-bottom:8px; flex:1; }
#sms-tienda .product-price { font-size:18px; font-weight:700; margin-bottom:12px; }
#sms-tienda .product-price-orig { font-size:13px; color:var(--gray-500); text-decoration:line-through; font-weight:400; margin-bottom:2px; }
#sms-tienda .product-price-promo { font-size:18px; font-weight:700; color:var(--red); margin-bottom:2px; }
#sms-tienda .product-discount-tag { display:inline-block; background:var(--red); color:#fff; font-size:10px; font-weight:700; padding:2px 7px; border-radius:4px; margin-left:6px; vertical-align:middle; }
#sms-tienda .btn-add { width:100%; background:var(--red); color:#fff; border:none; border-radius:8px; padding:10px; font-family:inherit; font-size:13px; font-weight:600; cursor:pointer; transition:background .15s; display:flex; align-items:center; justify-content:center; gap:6px; }
#sms-tienda .btn-add:hover { background:var(--red-dark); }
#sms-tienda .btn-add.added { background:var(--green); }

/* OVERLAY */
#sms-tienda .overlay { display:none; position:fixed; inset:0; background:rgba(0,0,0,.45); z-index:400; }
#sms-tienda .overlay.show { display:block; }

/* CART DRAWER */
#sms-tienda .cart-drawer { position:fixed; top:0; right:0; width:400px; height:100%; background:var(--white); z-index:500; display:none; flex-direction:column; box-shadow:var(--shadow-lg); overflow:hidden; }
#sms-tienda .cart-drawer.show { display:flex; }
#sms-tienda .drawer-header { padding:20px 24px; border-bottom:1px solid var(--gray-100); display:flex; align-items:center; justify-content:space-between; flex-shrink:0; }
#sms-tienda .drawer-title { font-size:17px; font-weight:700; }
#sms-tienda .btn-close { background:var(--gray-100); border:none; border-radius:8px; width:32px; height:32px; font-size:18px; color:var(--gray-500); cursor:pointer; display:flex; align-items:center; justify-content:center; }
#sms-tienda .cart-items { flex:1; overflow-y:auto; padding:16px 24px; min-height:0; }
#sms-tienda .cart-empty { text-align:center; padding:48px 0; color:var(--gray-500); }
#sms-tienda .cart-item { display:flex; gap:12px; padding:14px 0; border-bottom:1px solid var(--gray-100); }
#sms-tienda .ci-img { width:64px; height:64px; background:var(--gray-50); border-radius:8px; display:flex; align-items:center; justify-content:center; font-size:28px; flex-shrink:0; color:var(--gray-400,#9CA3AF); }
#sms-tienda .ci-info { flex:1; min-width:0; }
#sms-tienda .ci-brand { font-size:10px; font-weight:600; color:var(--gray-500); text-transform:uppercase; }
#sms-tienda .ci-name { font-size:13px; font-weight:500; color:var(--gray-900); margin:2px 0 8px; }
#sms-tienda .ci-row { display:flex; align-items:center; justify-content:space-between; }
#sms-tienda .ci-qty { display:flex; align-items:center; border:1px solid var(--gray-300); border-radius:7px; overflow:hidden; }
#sms-tienda .ci-qty button { background:var(--gray-50); border:none; width:28px; height:28px; font-size:16px; cursor:pointer; color:var(--gray-700); }
#sms-tienda .ci-qty span { width:32px; text-align:center; font-size:13px; font-weight:600; }
#sms-tienda .ci-price { font-size:15px; font-weight:700; }
/* X de eliminar — más visible */
#sms-tienda .btn-remove { background:none; border:none; color:var(--red); cursor:pointer; font-size:12px; font-weight:600; margin-top:4px; display:inline-flex; align-items:center; gap:4px; opacity:.85; }
#sms-tienda .btn-remove:hover { opacity:1; }
#sms-tienda .cart-footer { padding:16px 24px; border-top:1px solid var(--gray-100); flex-shrink:0; }
#sms-tienda .summary-row { display:flex; align-items:center; justify-content:space-between; font-size:13px; color:var(--gray-500); margin-bottom:6px; }
#sms-tienda .summary-row.total { font-size:16px; font-weight:700; color:var(--gray-900); margin-top:10px; padding-top:10px; border-top:1px solid var(--gray-100); }
#sms-tienda .btn-checkout { width:100%; background:var(--red); color:#fff; border:none; border-radius:10px; padding:14px; font-family:inherit; font-size:15px; font-weight:700; cursor:pointer; margin-top:14px; }
#sms-tienda .btn-checkout:hover { background:var(--red-dark); }

/* MODALES */
#sms-tienda .modal-backdrop { display:none; position:fixed; inset:0; background:rgba(0,0,0,.5); z-index:600; align-items:center; justify-content:center; padding:24px; overflow-y:auto; }
#sms-tienda #smsProductModal.show { align-items:flex-start; }
#sms-tienda #smsProductModal .modal { margin-top:5vh; }
#sms-tienda #smsPdDesc { min-height:3.2em; }
#sms-tienda .modal-backdrop.show { display:flex; }
#sms-tienda .modal { background:var(--white); border-radius:16px; width:100%; max-width:460px; box-shadow:var(--shadow-lg); overflow:hidden; max-height:calc(100vh - 48px); display:flex; flex-direction:column; }
#sms-tienda .modal-head { background:#6b7280; padding:24px 28px; color:#fff; flex-shrink:0; }
#sms-tienda .modal-head-top { display:flex; align-items:flex-start; justify-content:space-between; margin-bottom:6px; }
#sms-tienda .modal-head h2 { font-size:18px; font-weight:700; }
#sms-tienda .modal-head p { font-size:13px; color:rgba(255,255,255,.65); line-height:1.5; }
#sms-tienda .btn-close-white { background:rgba(255,255,255,.15); border:none; border-radius:7px; width:30px; height:30px; color:rgba(255,255,255,.8); font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
#sms-tienda .modal-body { padding:28px; overflow-y:auto; flex:1; }
#sms-tienda .form-group { margin-bottom:18px; }
#sms-tienda .form-label { display:block; font-size:12.5px; font-weight:600; color:var(--gray-700); margin-bottom:7px; }
#sms-tienda .form-input { width:100%; height:44px; border:1.5px solid var(--gray-300); border-radius:9px; padding:0 14px; font-family:inherit; font-size:14px; color:var(--gray-900); outline:none; transition:border-color .15s; }
#sms-tienda .form-input:focus { border-color:var(--red); }
#sms-tienda .checkout-summary { background:var(--gray-50); border-radius:10px; padding:16px; margin-bottom:18px; }
#sms-tienda .cs-row { display:flex; justify-content:space-between; font-size:13.5px; color:var(--gray-700); margin-bottom:6px; }
#sms-tienda .cs-row.total { font-weight:700; font-size:15px; color:var(--gray-900); padding-top:10px; border-top:1px solid var(--gray-200,#E5E7EB); margin-top:8px; }
#sms-tienda .success-screen { text-align:center; padding:8px 0 4px; }
#sms-tienda .success-icon { width:72px; height:72px; background:var(--green-bg); border-radius:50%; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; color:var(--green); }
#sms-tienda .success-screen h3 { font-size:20px; font-weight:700; margin-bottom:8px; }
#sms-tienda .success-screen p { font-size:14px; color:var(--gray-500); line-height:1.5; }
#sms-tienda .order-code { background:var(--gray-50); border:1px dashed var(--gray-300); border-radius:10px; padding:14px; margin:18px 0; font-size:20px; font-weight:800; letter-spacing:3px; color:#6b7280; }
#sms-tienda .btn-primary { background:var(--red); color:#fff; border:none; border-radius:9px; padding:13px 26px; font-family:inherit; font-size:14px; font-weight:600; cursor:pointer; transition:background .15s; display:inline-flex; align-items:center; gap:8px; }
#sms-tienda .btn-primary:hover { background:var(--red-dark); }

/* MODAL: CÓMO FUNCIONA */
#sms-tienda .hiw-list { list-style:none; }
#sms-tienda .hiw-item { display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--gray-100); align-items:flex-start; }
#sms-tienda .hiw-item:last-child { border-bottom:none; }
#sms-tienda .hiw-num { width:30px; height:30px; border-radius:50%; background:var(--red); color:#fff; font-size:13px; font-weight:700; display:flex; align-items:center; justify-content:center; flex-shrink:0; }
#sms-tienda .hiw-text strong { display:block; font-size:13.5px; font-weight:600; margin-bottom:2px; }
#sms-tienda .hiw-text span { font-size:12.5px; color:var(--gray-500); line-height:1.4; }


/* TOAST */
#sms-tienda .toast-container { position:fixed; bottom:24px; right:24px; z-index:1000; display:flex; flex-direction:column; gap:10px; }
#sms-tienda .toast { background:var(--gray-900); color:#fff; padding:12px 18px; border-radius:10px; font-size:13.5px; display:flex; align-items:center; gap:10px; box-shadow:var(--shadow-lg); max-width:320px; }
#sms-tienda .toast.success { background:var(--green); }
#sms-tienda .toast.error { background:var(--red); }

@media (max-width:768px) {
  #sms-tienda .sidebar { display:none; }

  #sms-tienda .hero-content { padding-left:18px; border-left-width:4px; }
  #sms-tienda .hero-title { font-size:26px; }
  #sms-tienda .cart-drawer { width:100%; }
  #sms-tienda .product-grid { grid-template-columns:repeat(2,1fr); gap:12px; }
  #sms-tienda .page-body { padding:16px 16px 48px; }
  #sms-tienda .cf-grid { grid-template-columns:1fr; }
  #sms-tienda .como-funciona { padding:28px 16px; }
  #sms-tienda .hero-banner { min-height:auto; }
  #sms-tienda .hero-body { padding:32px 20px 24px; }
  #sms-tienda .hero-steps-bar { grid-template-columns:1fr; padding:16px 20px; }
  #sms-tienda .hero-step-item { border-right:none; border-bottom:1px solid rgba(255,255,255,.12); padding:10px 0; }
  #sms-tienda .hero-step-item:last-child { border-bottom:none; }
}
