/* SERA demo e-commerce stylesheet */
/* --- Variables & base --- */
:root {
  --sera-primary: #e11d48;
  --sera-primary-soft: #fef2f2;
  --sera-accent: #b91c1c;
  --sera-danger: #e11d48;

  --sera-text-main: #111827;
  --sera-text-muted: #6b7280;
  --sera-bg-page: #f3f4f6;
  --sera-radius-card: 20px;
  --sera-shadow-card: 0 18px 45px rgba(15,23,42,0.06);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--sera-text-main);
  background: #ffffff;
  line-height: 1.5;
}
img {
  max-width: 100%;
  display: block;
}
a {
  text-decoration: none;
  color: inherit;
}
ul {
  list-style: none;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 12px;
}
.section {
  padding: 40px 0;
}
.section--grey {
  background: var(--sera-bg-page);
}
.section--soft {
  padding: 32px 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn--sm {
  padding: 6px 12px;
  font-size: 13px;
}
.btn--primary {
  background: linear-gradient(135deg, var(--sera-primary), var(--sera-accent));
  border-color: transparent;
  color: #fff;
}
.btn--primary:hover {
  opacity: .9;
}
.btn--outline {
  background: #fff;
  border-color: #e5e7eb;
  color: var(--sera-text-main);
}
.btn--outline:hover {
  border-color: #9ca3af;
  background: #f9fafb;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 11px;
  font-weight: 500;
}
.badge--sale {
  background: rgba(225, 29, 72, 0.08);
  color: var(--sera-danger);
}
.badge--new {
  background: rgba(225, 29, 72, 0.08);
  color: var(--sera-primary);
}

/* Topbar & Header */
.topbar {
  background: #16a34a;
  color: #ecfdf5;
  font-size: 13px;
  padding: 6px 0;
}
.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar__right a {
  margin-left: 10px;
  font-weight: 500;
}

.header {
  background: #b91c1c;
  color: #fff;
  padding: 10px 0;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
}
.logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: #fff;
  color: #b91c1c;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.logo-text__brand {
  font-weight: 800;
  letter-spacing: .08em;
}
.logo-text__tagline {
  font-size: 11px;
  opacity: .9;
}

.header__nav {
  flex: 1;
}
.header__nav ul {
  display: flex;
  justify-content: center;
  gap: 18px;
  font-size: 14px;
  font-weight: 500;
}
.header__nav a {
  padding: 4px 0;
  position: relative;
}
.header__nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: #fff;
  transition: width .2s ease;
}
.header__nav a:hover::after {
  width: 100%;
}
.header__right {
  display: flex;
  align-items: center;
  gap: 10px;
}
.header__search-input {
  border-radius: 999px;
  border: 1px solid #f97373;
  padding: 5px 10px;
  font-size: 13px;
  min-width: 160px;
}
.header__hotline {
  font-size: 13px;
  text-align: right;
  line-height: 1.3;
}
.header__hotline span { display:block; }
.header__hotline strong { font-size: 15px; }

.header__cart-link {
  position: relative;
  font-size: 20px;
}
.header__cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: #22c55e;
  color: #fff;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 999px;
}

/* Hero */
.hero {
  background: var(--sera-primary-soft);
  padding: 18px 0 30px;
}
.hero__grid {
  display: grid;
  grid-template-columns: 2.3fr 1.4fr;
  gap: 18px;
  align-items: stretch;
}
.hero__main {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
}
.hero__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__main::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    120deg,
    rgba(0,0,0,0.45) 0%,
    rgba(0,0,0,0.15) 45%,
    rgba(0,0,0,0.0) 100%
  );
}
.hero__tagline {
  position: absolute;
  left: 28px;
  bottom: 26px;
  color: #fff;
  max-width: 360px;
}
.hero__tagline h1 {
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 8px;
  text-shadow: 0 12px 25px rgba(0,0,0,0.35);
}
.hero__tagline p {
  font-size: 14px;
  margin-bottom: 10px;
}
.hero__side {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hero__banner {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: linear-gradient(135deg, #f97316, #fb7185);
  color: #fff;
  padding: 18px 16px;
  min-height: 120px;
}
.hero__banner--green {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}
.hero__banner h2 {
  font-size: 18px;
  margin-bottom: 4px;
}
.hero__banner p {
  font-size: 13px;
  max-width: 260px;
}
.hero__banner-actions { margin-top:10px; }

/* Brand story */
.brand-story {
  display: grid;
  grid-template-columns: 1.2fr 1.5fr;
  gap: 24px;
  align-items: center;
}
.brand-story__image img {
  border-radius: 24px;
}
.brand-story__eyebrow {
  font-size: 12px;
  color: var(--sera-primary);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  margin-bottom: 6px;
}
.brand-story__title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.brand-story__text {
  font-size: 14px;
  color: #4b5563;
  margin-bottom: 10px;
}
.brand-story__bullets li {
  font-size: 14px;
  color: #374151;
  margin-bottom: 4px;
  position: relative;
  padding-left: 18px;
}
.brand-story__bullets li::before {
  content:"•";
  position:absolute;
  left:4px;
  color:var(--sera-primary);
}

/* Category strip */
.category-strip {
  display: grid;
  grid-template-columns: repeat(4,minmax(0,1fr));
  gap: 14px;
}
.category-card {
  background:#fff;
  border-radius:18px;
  box-shadow:0 8px 20px rgba(15,23,42,0.06);
  padding:12px 10px 14px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.category-card__image {
  height:110px;
  display:flex;
  align-items:center;
  justify-content:center;
  margin-bottom:8px;
}
.category-card__title {
  font-size:14px;
  font-weight:600;
  margin-bottom:3px;
}
.category-card__subtitle {
  font-size:12px;
  color:var(--sera-text-muted);
  margin-bottom:8px;
}

/* Product grid */
.product-section__header{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  margin-bottom:10px;
}
.product-section__title{
  font-size:18px;
  font-weight:700;
}
.product-section__subtitle{
  font-size:13px;
  color:var(--sera-text-muted);
}
.product-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.product-card{
  background:#fff;
  border-radius:18px;
  box-shadow:0 8px 20px rgba(15,23,42,0.05);
  padding:10px 10px 12px;
  display:flex;
  flex-direction:column;
  height:100%;
}
.product-card__image{
  position:relative;
  margin-bottom:8px;
  min-height:160px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.product-card__image img{
  max-height:160px;
  object-fit:contain;
}
.product-card__badge{
  position:absolute;
  left:10px;
  top:10px;
}
.product-card__body{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.product-card__category{
  font-size:11px;
  text-transform:uppercase;
  color:#9ca3af;
  letter-spacing:.08em;
}
.product-card__name{
  font-size:14px;
  font-weight:600;
  margin-bottom:2px;
  min-height:38px;
}
.product-card__excerpt{
  font-size:13px;
  color:#4b5563;
}
.product-card__price-row{
  margin-top:4px;
}
.product-card__price{
  font-size:15px;
  font-weight:700;
  color:var(--sera-primary);
}
.product-card__price-old{
  font-size:12px;
  color:#9ca3af;
  text-decoration:line-through;
  margin-left:6px;
}
.product-card__bottom{
  margin-top:8px;
  display:flex;
  justify-content:space-between;
  gap:6px;
}

/* PAGE / SIDEBAR */
.page{
  padding-top:32px;
  padding-bottom:40px;
}
.page-layout{
  display:grid;
  grid-template-columns:260px minmax(0,1fr);
  gap:18px;
  align-items:flex-start;
}
.page-card{
  background:#fff;
  border-radius:var(--sera-radius-card);
  box-shadow:var(--sera-shadow-card);
  padding:24px 26px 26px;
  border:1px solid rgba(37,99,235,0.06);
}
.page-title{
  font-size:22px;
  font-weight:700;
  margin-bottom:12px;
}
.page-subtitle{
  font-size:16px;
  font-weight:600;
  margin:18px 0 8px;
  color:var(--sera-primary);
}
.page-card p{
  font-size:14px;
  color:var(--sera-text-main);
  margin-bottom:8px;
}
.page-card ul{
  margin-left:18px;
  margin-bottom:8px;
}
.page-card li{
  font-size:14px;
  color:var(--sera-text-main);
  margin-bottom:4px;
}
.page-sidebar{
  background:#fff;
  border-radius:var(--sera-radius-card);
  box-shadow:var(--sera-shadow-card);
  padding:18px 18px 20px;
  border-left:3px solid var(--sera-primary);
}
.page-sidebar__title{
  font-size:16px;
  font-weight:600;
  margin-bottom:8px;
}
.page-sidebar__nav{
  display:flex;
  flex-direction:column;
  gap:6px;
  font-size:14px;
}
.page-sidebar__nav a{
  color:var(--sera-text-main);
  padding:4px 0;
}
.page-sidebar__nav a.is-active,
.page-sidebar__nav a:hover{
  color:var(--sera-primary);
}

/* Filter search */
.filter-search{
  margin-top:16px;
  font-size:13px;
}
.filter-search label{
  display:block;
  margin-bottom:4px;
}
.filter-search input[type="text"]{
  width:100%;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:6px 8px;
  font-size:13px;
}

/* Product detail */
.product-detail__layout{
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(0,1.4fr);
  gap:20px;
}
.product-detail__image-main img{
  border-radius:16px;
  border:1px solid #e5e7eb;
}
.product-detail__note{
  font-size:12px;
  color:var(--sera-text-muted);
  margin-top:6px;
}
.product-detail__category{
  font-size:11px;
  text-transform:uppercase;
  color:#9ca3af;
  letter-spacing:.08em;
}
.product-detail__title{
  font-size:22px;
  font-weight:700;
  margin:6px 0 8px;
}
.product-detail__short{
  font-size:14px;
  color:#4b5563;
}
.product-detail__price-row{
  margin:10px 0;
}
.product-detail__price{
  font-size:20px;
  font-weight:700;
  color:var(--sera-primary);
  margin-right:8px;
}
.product-detail__price-old{
  font-size:14px;
  color:#9ca3af;
  text-decoration:line-through;
}
.product-detail__status{
  font-size:13px;
  margin-bottom:10px;
}
.product-detail__buy{
  margin-bottom:12px;
}
.product-detail__buy label{
  font-size:13px;
  display:block;
  margin-bottom:4px;
}
.product-detail__buy input[type="number"]{
  width:80px;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:5px 6px;
  margin-bottom:8px;
}
.product-detail__buy-buttons{
  display:flex;
  gap:8px;
}
.product-detail__trust{
  font-size:13px;
  color:#4b5563;
  margin-top:10px;
}
.product-detail__tabs{
  margin-top:24px;
}

/* Cart */
.cart-table{
  margin-top:14px;
  border-radius:16px;
  border:1px solid #e5e7eb;
  overflow:hidden;
}
.cart-row{
  display:grid;
  grid-template-columns: minmax(0,1.9fr) minmax(0,1fr) 110px minmax(0,1fr) 60px;
  gap:10px;
  align-items:center;
  padding:10px 12px;
  font-size:14px;
}
.cart-row--head{
  background:#f9fafb;
  font-weight:600;
}
.cart-col--product{
  display:flex;
  align-items:center;
  gap:10px;
}
.cart-col--product img{
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:12px;
  border:1px solid #e5e7eb;
}
.cart-product__name{
  font-weight:600;
}
.cart-col input[type="number"]{
  width:70px;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:5px 6px;
}
.cart-summary{
  margin-top:16px;
  border-radius:16px;
  border:1px solid #e5e7eb;
  padding:12px 14px;
  max-width:380px;
}
.cart-summary__line{
  display:flex;
  justify-content:space-between;
  margin-bottom:6px;
}
.cart-summary__note{
  font-size:12px;
  color:var(--sera-text-muted);
  margin-bottom:10px;
}
.cart-summary__actions{
  display:flex;
  gap:8px;
}

/* Checkout */
.checkout-form__group{
  margin-bottom:10px;
  font-size:13px;
}
.checkout-form__group label{
  display:block;
  margin-bottom:4px;
}
.checkout-form__group input,
.checkout-form__group textarea{
  width:100%;
  border-radius:8px;
  border:1px solid #e5e7eb;
  padding:6px 8px;
  font-size:13px;
}
.alert{
  border-radius:10px;
  padding:8px 10px;
  margin-bottom:10px;
  font-size:13px;
}
.alert--error{
  background:#fef2f2;
  color:#b91c1c;
  border:1px solid #fecaca;
}
.checkout-summary{
  font-size:13px;
}
.checkout-summary__item{
  display:flex;
  justify-content:space-between;
  margin-bottom:6px;
}
.checkout-summary__line{
  display:flex;
  justify-content:space-between;
  margin-top:6px;
}

/* Footer */
.footer{
  margin-top:32px;
  padding:20px 0;
  background:#111827;
  color:#9ca3af;
  font-size:13px;
}
.footer__top{
  display:flex;
  gap:24px;
}
.footer__col{
  flex:1;
}
.footer__brand{
  font-weight:700;
  color:#e5e7eb;
}
.footer__title{
  font-weight:600;
  margin-bottom:6px;
}
.footer__col ul li + li{
  margin-top:4px;
}
.footer__bottom{
  margin-top:10px;
  border-top:1px solid #1f2937;
  padding-top:8px;
  text-align:center;
}

/* Responsive */
@media (max-width: 992px){
  .hero__grid{grid-template-columns:1fr;}
  .brand-story{grid-template-columns:1fr;}
  .category-strip,
  .product-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
  .page-layout{grid-template-columns:1fr;}
  .product-detail__layout{grid-template-columns:1fr;}
}
@media (max-width: 640px){
  .header__inner{
    flex-direction:column;
    align-items:flex-start;
    gap:8px;
  }
  .header__nav ul{
    justify-content:flex-start;
    overflow-x:auto;
    padding-bottom:4px;
  }
  .category-strip,
  .product-grid{
    grid-template-columns:1fr;
  }
  .page-card{
    padding:18px 16px 20px;
  }
  .cart-row{
    grid-template-columns: minmax(0,1.9fr) 1fr;
    grid-template-rows:auto auto auto;
  }
}
