/*
Theme Name: Discount Shop
Theme URI: https://shaplakanon.com/
Author: ShaplaKanon
Author URI: https://shaplakanon.com/
Description: A clean discount deals aggregator theme.
Version: 1.0.0
Text Domain: discount-shop
*/

:root{
  --primary:#f44336;
  --accent:#ff9800;
  --bg:#f5f7fb;
  --text:#222;
  --muted:#666;
  --card:#fff;
  --border:#e3e6ef;
  --radius:14px;
  --shadow:0 8px 20px rgba(15,23,42,.08);
}
*{box-sizing:border-box;margin:0;padding:0}
body{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}
a{text-decoration:none;color:inherit}
img{max-width:100%;display:block}
button{font:inherit;border:none;cursor:pointer}
.container{width:min(1120px,100% - 32px);margin:0 auto}

/* Top bar */
.top-bar{
  background:#111827;
  color:#e5e7eb;
  font-size:.8rem;
  padding:6px 0;
}
.top-bar-inner{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:center;
}
.top-links{display:flex;gap:12px}
.top-links a{opacity:.8}
.top-links a:hover{opacity:1}

/* Header */
header.site-header{
  background:#fff;
  position:sticky;
  top:0;
  z-index:20;
  box-shadow:0 1px 0 rgba(15,23,42,.06);
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 0;
  gap:16px;
}
.logo{
  font-weight:800;
  font-size:1.35rem;
  letter-spacing:.04em;
  display:flex;
  align-items:center;
  gap:4px;
}
.logo span:first-child{color:var(--primary);}
.logo span:last-child{color:#111827;}
.logo-tag{
  margin-left:6px;
  padding:2px 8px;
  border-radius:999px;
  background:#fee2e2;
  color:#b91c1c;
  font-size:.7rem;
  text-transform:uppercase;
}
.site-header nav{
  display:flex;
  gap:20px;
  font-size:.9rem;
}
.site-header nav ul{
  list-style:none;
  display:flex;
  gap:20px;
}
.site-header nav li{position:relative;}
.site-header nav a{
  position:relative;
  padding-bottom:4px;
  color:#4b5563;
}
.site-header nav a:hover::after,
.site-header nav .current-menu-item > a::after{
  content:"";
  position:absolute;
  left:0;
  bottom:0;
  width:18px;
  height:2px;
  border-radius:999px;
  background:var(--primary);
}
.header-actions{
  display:flex;
  align-items:center;
  gap:10px;
}
.search{
  position:relative;
}
.search input[type="search"]{
  padding:6px 26px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:.85rem;
  background:#f9fafb;
  outline:none;
  min-width:160px;
  height: 40px;
  width: 400px;
  
}
.search input[type="search"]:focus{border-color:var(--primary);background:#fff}
.search span.icon{
  position:absolute;
  left:8px;top:50%;
  transform:translateY(-50%);
  font-size:.8rem;
  color:#9ca3af;
}
.btn{
  padding:7px 16px;
  border-radius:999px;
  font-size:.85rem;
  font-weight:600;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.btn-primary{
  background:var(--primary);
  color:#fff;
  box-shadow:0 8px 16px rgba(244,67,54,.35);
}
.btn-primary:hover{background:#dc2626;}
.btn-ghost{
  background:transparent;
  color:#4b5563;
}
.btn-ghost:hover{background:#f3f4f6;}
.nav-toggle{
  display:none;
  width:32px;
  height:32px;
  border-radius:999px;
  background:#f3f4f6;
  align-items:center;
  justify-content:center;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after{
  content:"";
  display:block;
  width:18px;
  height:2px;
  border-radius:999px;
  background:#111827;
  position:relative;
}
.nav-toggle span::before{position:absolute;top:-5px;}
.nav-toggle span::after{position:absolute;top:5px;}
.header-wrap.nav-open .nav-toggle span{background:transparent;}
.header-wrap.nav-open .nav-toggle span::before{top:0;transform:rotate(45deg);}
.header-wrap.nav-open .nav-toggle span::after{top:0;transform:rotate(-45deg);}
.nav-mobile{
  display:none;
  flex-direction:column;
  gap:8px;
  padding:8px 0 12px;
  border-top:1px solid var(--border);
}
.nav-mobile ul{list-style:none;padding-left:0;}
.nav-mobile a{font-size:.9rem;color:#4b5563;}

/* Hero */
.hero{
  padding:28px 0 34px;
  background:
    radial-gradient(circle at top left,#ffe4e6,transparent 55%),
    radial-gradient(circle at bottom right,#fffbeb,transparent 55%);
}
.hero-inner{
  display:grid;
  grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);
  gap:28px;
  align-items:center;
}
.hero-label{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:4px 10px;
  border-radius:999px;
  background:#fee2e2;
  font-size:.75rem;
  color:#b91c1c;
  text-transform:uppercase;
  letter-spacing:.06em;
  margin-bottom:8px;
}
.hero-label span{
  width:18px;height:18px;
  border-radius:999px;
  background:#fff;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.7rem;
  color:var(--primary);
}
.hero-title{
  font-size:clamp(2rem,3vw + 1rem,2.6rem);
  line-height:1.1;
  margin-bottom:10px;
}
.hero-title span{color:var(--primary);}
.hero-text{
  font-size:.95rem;
  color:var(--muted);
  max-width:440px;
  margin-bottom:16px;
}
.hero-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  align-items:center;
  margin-bottom:16px;
}
.hero-actions a.link{
  font-size:.88rem;
  color:#4b5563;
  display:inline-flex;
  align-items:center;
  gap:4px;
}
.hero-meta{
  display:flex;
  flex-wrap:wrap;
  gap:16px;
  font-size:.8rem;
  color:#6b7280;
}
.hero-meta strong{color:#111827;}

.hero-card{
  background:#fff;
  border-radius:var(--radius);
  padding:16px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
.hero-card-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:8px;
  font-size:.85rem;
  font-weight:600;
}
.hero-badge{
  padding:3px 8px;
  border-radius:999px;
  background:#fef3c7;
  color:#92400e;
  font-size:.7rem;
  font-weight:600;
}
.hero-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:8px;
  margin-top:6px;
}
.hero-product{
  background:#f9fafb;
  border-radius:10px;
  padding:7px;
  font-size:.75rem;
}
.hero-thumb{
  height:46px;
  border-radius:8px;
  background:linear-gradient(135deg,#fee2e2,#ffedd5);
  margin-bottom:4px;
}
.hero-name{
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-bottom:2px;
}
.hero-price{
  font-size:.7rem;
  display:flex;
  gap:4px;
}
.hero-price .old{text-decoration:line-through;color:#9ca3af;}
.hero-price .new{color:#16a34a;font-weight:700;}
.hero-source{font-size:.7rem;color:#6b7280;margin-top:2px;}
.hero-tag{
  position:absolute;
  left:10px;top:10px;
  background:#111827;
  color:#e5e7eb;
  font-size:.7rem;
  padding:4px 8px;
  border-radius:999px;
}
.hero-save{
  position:absolute;
  right:-10px;bottom:-10px;
  background:var(--primary);
  color:#fff;
  padding:9px 18px;
  border-radius:999px;
  font-size:.8rem;
  transform:rotate(-7deg);
  box-shadow:0 12px 26px rgba(239,68,68,.5);
}
.hero-save span{font-weight:800;}

/* Sections */
section{padding:26px 0;}
.section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.section-title{
  font-size:1.15rem;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:8px;
}
.section-title span.icon{
  width:24px;height:24px;
  border-radius:999px;
  background:#fee2e2;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:.85rem;
  color:#b91c1c;
}
.section-sub{
  font-size:.82rem;
  color:var(--muted);
}

/* Categories */
.cat-grid{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
}
.cat-card{
  background:var(--card);
  border-radius:12px;
  padding:10px 9px;
  border:1px solid var(--border);
  box-shadow:0 4px 10px rgba(15,23,42,.03);
  font-size:.8rem;
  cursor:pointer;
  transition:.2s;
}
.cat-card:hover{
  transform:translateY(-2px);
  border-color:var(--primary);
  box-shadow:var(--shadow);
}
.cat-icon{
  width:28px;height:28px;
  border-radius:9px;
  background:#fee2e2;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:4px;
}
.cat-name{font-weight:600;font-size:.86rem;}
.cat-note{font-size:.74rem;color:var(--muted);}

/* Deals */
.filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-bottom:12px;
}
.filter-btn{
  padding:5px 11px;
  border-radius:999px;
  border:1px solid var(--border);
  font-size:.78rem;
  background:#fff;
  color:#4b5563;
}
.filter-btn.active{
  background:#fee2e2;
  border-color:var(--primary);
  color:#b91c1c;
}
.sort{
  margin-left:auto;
  font-size:.8rem;
  border-radius:999px;
  border:1px solid var(--border);
  padding:4px 9px;
  background:#fff;
}
.deal-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}
.deal{
  background:var(--card);
  border-radius:12px;
  padding:9px;
  border:1px solid var(--border);
  box-shadow:0 4px 10px rgba(15,23,42,.03);
  font-size:.8rem;
  position:relative;
  transition:.2s;
}
.deal:hover{transform:translateY(-2px);box-shadow:var(--shadow);}
.deal-img{
  height:110px;
  border-radius:10px;
  background:linear-gradient(135deg,#e0ecff,#fce7f3);
  margin-bottom:7px;
  position:relative;
  overflow:hidden;
}
.deal-off{
  position:absolute;
  top:7px;left:7px;
  background:var(--primary);
  color:#fff;
  font-size:.72rem;
  padding:3px 7px;
  border-radius:999px;
  font-weight:700;
}
.deal-source{
  position:absolute;
  bottom:7px;left:7px;
  background:rgba(15,23,42,.85);
  color:#e5e7eb;
  font-size:.7rem;
  padding:3px 7px;
  border-radius:999px;
}
.deal-title{
  font-weight:600;
  font-size:.9rem;
  min-height:34px;
}
.deal-price{
  display:flex;
  gap:7px;
  align-items:baseline;
  margin-top:3px;
  font-size:.86rem;
}
.deal-price .old{text-decoration:line-through;color:#9ca3af;font-size:.76rem;}
.deal-price .new{color:#16a34a;font-weight:700;}
.deal-meta{
  display:flex;
  justify-content:space-between;
  margin-top:3px;
  font-size:.72rem;
  color:#6b7280;
}
.deal-actions{
  margin-top:7px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.deal-btn{
  background:#111827;
  color:#fff;
  padding:5px 9px;
  border-radius:999px;
  font-size:.75rem;
}
.deal-save{
  font-size:.72rem;
  color:var(--accent);
  font-weight:600;
}
.hidden{display:none !important;}

/* Newsletter */
.newsletter{
  background:#0f172a;
  border-radius:var(--radius);
  padding:16px 14px;
  color:#e5e7eb;
  display:grid;
  grid-template-columns:minmax(0,1.6fr) minmax(0,1.1fr);
  gap:18px;
  align-items:center;
}
.newsletter-title{font-size:1.05rem;font-weight:700;margin-bottom:4px;}
.newsletter-text{font-size:.83rem;color:#9ca3af;max-width:380px;}
.newsletter-form{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  justify-content:flex-end;
  align-items:center;
}
.newsletter-form input,
.newsletter-form select{
  font-size:.8rem;
  border-radius:999px;
  border:1px solid #334155;
  padding:7px 10px;
  background:#020617;
  color:#e5e7eb;
  min-width:150px;
  outline:none;
}
.newsletter-form button{
  background:var(--accent);
  color:#111827;
  font-size:.82rem;
  font-weight:700;
  padding:7px 14px;
  border-radius:999px;
  box-shadow:0 8px 18px rgba(248,150,44,.4);
  border:none;
  white-space:nowrap;
}
.newsletter-note{
  margin-top:5px;
  font-size:.74rem;
  color:#9ca3af;
}

/* Footer */
footer.site-footer{
  margin-top:22px;
  background:#020617;
  color:#9ca3af;
  padding:16px 0 10px;
  font-size:.8rem;
}
.footer-grid{
  display:grid;
  grid-template-columns:1.4fr repeat(3,minmax(0,1fr));
  gap:18px;
  margin-bottom:12px;
}
.footer-logo{
  font-weight:700;
  font-size:1.05rem;
  margin-bottom:4px;
}
.footer-logo span:first-child{color:var(--accent);}
.footer-logo span:last-child{color:#e5e7eb;}
.footer-title{
  font-weight:600;
  color:#e5e7eb;
  margin-bottom:4px;
}
.footer-links{display:flex;flex-direction:column;gap:3px;}
.footer-bottom{
  border-top:1px solid #111827;
  padding-top:6px;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
}
.social{display:flex;gap:7px;}
.social a{
  width:22px;height:22px;
  border-radius:999px;
  border:1px solid #111827;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  color:#e5e7eb;
  font-size:.7rem;
}

/* Back to top */
.back-top{
  position:fixed;
  right:16px;bottom:16px;
  width:34px;height:34px;
  border-radius:999px;
  background:#111827;
  color:#e5e7eb;
  display:none;
  align-items:center;
  justify-content:center;
  box-shadow:0 10px 22px rgba(15,23,42,.5);
  z-index:30;
  font-size:.9rem;
}
.back-top.show{display:flex;}

/* Responsive */
@media(max-width:960px){
  .hero-inner{grid-template-columns:minmax(0,1fr);}
  .hero-card{margin-top:8px;}
  .cat-grid{grid-template-columns:repeat(3,minmax(0,1fr));}
  .deal-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .newsletter{grid-template-columns:minmax(0,1fr);}
  .newsletter-form{justify-content:flex-start;}
  .footer-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:720px){
  .site-header nav{display:none;}
  .header-actions .search{display:none;}
  .nav-toggle{display:inline-flex;}
  .header-wrap.nav-open .nav-mobile{display:flex;}
  .cat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .deal-grid{grid-template-columns:minmax(0,1fr);}
  .footer-grid{grid-template-columns:minmax(0,1fr);}
  .top-bar-inner{flex-direction:column;align-items:flex-start;}
}
@media(max-width:480px){
  .newsletter-form{flex-direction:column;align-items:stretch;}
  .newsletter-form input,
  .newsletter-form select,
  .newsletter-form button{width:100%;}
}

/* Mobile header: show search below logo */
@media (max-width: 720px) {
  /* Stack header items vertically */
	.logo{
		margin: 0 auto;
	}
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  /* Make the search visible and full-width */
  .header-actions {
    width: 100%;
	max-width: 400px;
    margin: 0 auto;
  }

  .header-actions .search {
    display: block;   /* override previous display:none */
    width: 100%;
    margin-top: 4px;
  }

  .header-actions .search form {
    width: 100%;
  }

  .header-actions .search input[type="search"] {
    width: 100%;
	height: 40px;
  }

  /* Always show mobile menu (nav-mobile) under the search bar */
  .nav-mobile {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px 0 12px;
    border-top: 1px solid var(--border);
  }

  .nav-mobile ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-left: 0;
  }

  .nav-mobile a {
    font-size: 0.9rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f9fafb;
    border: 1px solid var(--border);
  }

  /* No need for hamburger toggle if menu is always visible */
  .nav-toggle {
    display: none;
  }
}
