/* ==========================================================================
   Shop Trade Market - main stylesheet
   One file, plain CSS. Sections:
   1. Colours and basics   2. Layout   3. Header and footer   4. Buttons
   5. Home page layout     6. Cards and grids   7. Page headings
   8. Articles and policies   9. Forms   10. Small screens
   Alignment rule used everywhere: every row is a grid with equal columns,
   cards in a row stretch to the same height, and buttons sit at the bottom.
   ========================================================================== */


/* 1. Colours and basics ------------------------------------------------- */
:root {
  --slate: #293241;
  --blue: #3d5a80;
  --blue-dark: #2b4163;
  --sky: #98c1d9;
  --ice: #eaf3f8;
  --orange: #ee6c4d;
  --orange-dark: #d4512f;
  --ink: #1f2733;
  --muted: #5d6877;
  --line: #d6e2ea;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 6px 18px rgba(41, 50, 65, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.7;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); }
h1, h2, h3, h4 { color: var(--slate); line-height: 1.2; margin: 0 0 12px; font-weight: 800; }
h1 { font-size: 2.9rem; letter-spacing: -0.02em; }
h2 { font-size: 2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.08rem; }
p { margin: 0 0 16px; }
ul { margin: 0 0 16px; padding-left: 22px; }


/* 2. Layout ------------------------------------------------------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }
.section { padding: 70px 0; }
.bg-ice { background: var(--ice); }
.center { text-align: center; }

.section-head { max-width: 640px; margin: 0 auto 40px; text-align: center; }
.section-head p { color: var(--muted); }

/* Heading on the left, button on the right, both aligned to the bottom */
.row-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px 24px; margin-bottom: 32px; }
.row-head h2 { margin: 0; }

.label {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--orange-dark);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.label-light { color: #ffd9cf; }

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.tick-list { list-style: none; padding: 0; }
.tick-list li { padding-left: 30px; margin-bottom: 10px; position: relative; }
.tick-list li::before {
  content: "\2713";
  position: absolute; left: 0; top: 2px;
  width: 20px; height: 20px; line-height: 20px;
  border-radius: 4px;
  background: var(--orange);
  color: var(--white);
  text-align: center;
  font-size: 0.8rem;
  font-weight: 800;
}


/* 3. Header and footer -------------------------------------------------- */
.topbar { background: var(--slate); color: #c7d3e0; font-size: 0.88rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 24px; padding-top: 8px; padding-bottom: 8px; }
.topbar a { color: var(--white); font-weight: 700; text-decoration: none; }

.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; padding-top: 14px; padding-bottom: 14px; }

.logo { font-size: 1.6rem; font-weight: 900; text-decoration: none; color: var(--slate); letter-spacing: -0.02em; }
.logo span { color: var(--orange); }

.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; }
.nav a { text-decoration: none; color: var(--slate); font-weight: 700; padding: 6px 0; border-bottom: 3px solid transparent; transition: color 0.2s, border-color 0.2s; }
.nav a:hover { color: var(--orange-dark); }
.nav a.current { color: var(--blue); border-bottom-color: var(--orange); }

.site-footer { background: var(--slate); color: #b7c4d4; padding-top: 62px; }
.site-footer a { color: #b7c4d4; text-decoration: none; }
.site-footer a:hover { color: var(--white); text-decoration: underline; }
.site-footer h4 { color: var(--white); font-size: 1rem; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 36px; align-items: start; }
.footer-grid ul { list-style: none; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { color: var(--white); font-size: 1.5rem; font-weight: 900; margin-bottom: 10px; }
.footer-logo span { color: var(--orange); }
.footer-bottom { border-top: 1px solid #435066; margin-top: 46px; padding: 22px 0; font-size: 0.88rem; }
.footer-bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; }
.footer-bottom p { margin: 0; }
.footer-bottom a { margin-left: 18px; }
.footer-bottom a:first-child { margin-left: 0; }


/* 4. Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 11px 26px;
  border: 2px solid var(--orange);
  border-radius: 8px;
  background: var(--orange);
  color: var(--white);
  font-size: 1rem;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--orange-dark); border-color: var(--orange-dark); }
.btn-outline { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-outline:hover { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn-white { background: var(--white); border-color: var(--white); color: var(--blue-dark); }
.btn-white:hover { background: var(--ice); border-color: var(--ice); }
.btn-small { padding: 8px 18px; font-size: 0.92rem; }


/* 5. Home page layout --------------------------------------------------- */

/* Sidebar on the left, banner and promos on the right */
.market-top { background: var(--ice); padding: 32px 0 40px; }
.market { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: stretch; }

.sidebar { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 0; display: flex; flex-direction: column; }
.sidebar h2 { margin: 0 0 8px; padding: 0 22px 12px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--blue); border-bottom: 1px solid var(--line); }
.sidebar a { display: block; flex: 1; padding: 9px 22px; color: var(--slate); font-weight: 600; text-decoration: none; border-left: 4px solid transparent; }
.sidebar a:hover { background: var(--ice); border-left-color: var(--orange); color: var(--blue); }
.sidebar a.all { flex: 0 0 auto; margin-top: 8px; border-top: 1px solid var(--line); color: var(--orange-dark); font-weight: 800; padding-top: 14px; }

.market-main { display: grid; grid-template-rows: 1fr auto; gap: 24px; }

.banner { display: grid; grid-template-columns: 1.15fr 0.85fr; align-items: center; gap: 28px; background: linear-gradient(120deg, var(--slate) 0%, var(--blue) 100%); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px 40px; color: #d7e3ef; }
.banner h1 { color: var(--white); font-size: 2.5rem; }
.banner p { font-size: 1.05rem; }
.banner img { width: 100%; max-width: 300px; margin-left: auto; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 5px solid var(--white); background: var(--white); }
.badge { display: inline-block; margin-bottom: 14px; padding: 4px 14px; border-radius: 999px; background: var(--orange); color: var(--white); font-size: 0.8rem; font-weight: 700; }

.promos { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.promo { display: grid; grid-template-columns: 110px 1fr; align-items: center; gap: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; text-decoration: none; color: var(--slate); transition: border-color 0.2s, transform 0.2s; }
.promo:hover { border-color: var(--orange); transform: translateY(-3px); }
.promo img { width: 110px; height: 110px; object-fit: cover; border-radius: 8px; background: var(--white); border: 1px solid var(--line); }
.promo span { display: block; font-size: 0.78rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; color: var(--orange-dark); }
.promo strong { font-size: 1.1rem; line-height: 1.3; }

/* Four equal columns: trust bar, steps, features, numbers */
.trust { background: var(--white); border-bottom: 1px solid var(--line); }
.trust .wrap { display: grid; grid-template-columns: repeat(4, 1fr); }
.trust div { padding: 22px 20px; border-left: 1px solid var(--line); text-align: center; }
.trust div:first-child { border-left: 0; }
.trust strong { display: block; color: var(--slate); }
.trust span { color: var(--muted); font-size: 0.9rem; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 26px 24px; box-shadow: var(--shadow); }
.step-number { display: inline-block; width: 38px; height: 38px; line-height: 38px; border-radius: 50%; background: var(--blue); color: var(--white); text-align: center; font-weight: 800; margin-bottom: 12px; }
.step p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Compact department rows: 4 equal columns, 2 rows */
.dept-rows { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.dept-row { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; text-decoration: none; color: var(--slate); transition: border-color 0.2s, transform 0.2s; }
.dept-row:hover { border-color: var(--orange); transform: translateY(-3px); }
.dept-row img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; background: var(--white); border: 1px solid var(--line); }
.dept-row h3 { margin-bottom: 2px; font-size: 1rem; }
.dept-row p { margin: 0; font-size: 0.85rem; color: var(--muted); line-height: 1.4; }

.split-banner { display: grid; grid-template-columns: 0.8fr 1.2fr; align-items: center; gap: 44px; background: linear-gradient(120deg, var(--blue) 0%, var(--slate) 100%); border-radius: var(--radius); box-shadow: var(--shadow); padding: 40px; color: #d7e3ef; }
.split-banner img { width: 100%; max-width: 320px; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 5px solid var(--white); background: var(--white); }
.split-banner h2 { color: var(--white); }

.newsletter { background: var(--blue); color: #dbe7f3; padding: 64px 0; }
.newsletter .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; align-items: center; }
.newsletter h2 { color: var(--white); }
.newsletter p { margin: 0 0 12px; }
.newsletter .form { background: var(--white); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px; }
.newsletter .form p { color: var(--muted); }

.photo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.photo-grid img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); border: 4px solid var(--white); box-shadow: var(--shadow); background: var(--white); }


/* 6. Cards and grids ---------------------------------------------------- */

/* Products: 3 equal columns. Each card is a column, so the name stretches and
   the price and button always sit at the same height along a row. */
.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; }
.product { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; position: relative; box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s; }
.product:hover { transform: translateY(-4px); border-color: var(--orange); }
.product img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--white); border-bottom: 1px solid var(--line); }
.product-info { padding: 16px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.product-info h3 { flex: 1; min-height: 3.2em; }
.tag { position: absolute; top: 12px; left: 12px; padding: 3px 12px; border-radius: 4px; background: var(--slate); color: var(--white); font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.price { font-size: 1.6rem; font-weight: 900; color: var(--blue); margin-bottom: 12px; line-height: 1.1; }
.price small { font-size: 0.76rem; font-weight: 400; color: var(--muted); }
.product .btn { align-self: flex-start; }

/* Shop page department cards: 4 equal columns, 2 rows */
.departments { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }
.department { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--slate); box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s; }
.department:hover { transform: translateY(-4px); border-color: var(--orange); }
.department img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; background: var(--white); border-bottom: 1px solid var(--line); }
.department div { padding: 14px 18px 18px; flex: 1; }
.department h3 { margin-bottom: 2px; }
.department p { margin: 0; font-size: 0.9rem; color: var(--muted); }

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; align-items: stretch; }
.feature { background: var(--ice); border-top: 4px solid var(--orange); border-radius: var(--radius); padding: 24px; }
.feature p { margin: 0; color: var(--muted); font-size: 0.95rem; }

/* Blog cards: the "Read" link is pushed to the bottom so rows line up */
.blog-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; align-items: stretch; }
.blog-list-2 { grid-template-columns: repeat(2, 1fr); max-width: 780px; margin: 0 auto; }
.blog-card { display: flex; flex-direction: column; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform 0.2s, border-color 0.2s; }
.blog-card:hover { transform: translateY(-4px); border-color: var(--orange); }
.blog-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: var(--ice); }
.blog-card > div { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.blog-card .meta { font-size: 0.78rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange-dark); margin-bottom: 6px; }
.blog-card p { color: var(--muted); font-size: 0.95rem; }
.blog-card a { margin-top: auto; font-weight: 800; text-decoration: none; }


/* 7. Page headings ------------------------------------------------------ */
.page-head { background: linear-gradient(120deg, var(--slate) 0%, var(--blue) 100%); color: var(--white); padding: 48px 0; border-bottom: 4px solid var(--orange); }
.page-head h1 { color: var(--white); margin-bottom: 6px; }
.page-head p { margin: 0; color: #cfdcea; }
.crumbs { font-size: 0.88rem; margin-bottom: 10px !important; }
.crumbs a { color: var(--white); }


/* 8. Articles and policies ---------------------------------------------- */
.article, .legal { max-width: 780px; margin: 0 auto; }
.article h2, .legal h2 { margin-top: 38px; font-size: 1.55rem; color: var(--blue); }
.legal h3 { margin-top: 22px; }
.article .lead { font-size: 1.2rem; color: var(--muted); }
.note { background: var(--ice); border-left: 5px solid var(--orange); border-radius: 8px; padding: 16px 22px; margin: 28px 0; }
.note p { margin: 0; }
.updated { color: var(--muted); font-size: 0.92rem; }


/* 9. Forms -------------------------------------------------------------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.info-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: stretch; }
.info-cards h3 { color: var(--blue); }
.info-cards p { margin: 0; }

.form label { display: block; margin-bottom: 6px; font-weight: 700; }
.form input[type="text"],
.form input[type="email"],
.form textarea {
  width: 100%;
  padding: 11px 14px;
  margin-bottom: 18px;
  border: 1px solid #b4c6d4;
  border-radius: 8px;
  font: inherit;
}
.form input:focus, .form textarea:focus { outline: 3px solid #c8dcea; border-color: var(--blue); }
.form textarea { min-height: 140px; resize: vertical; }
.form .check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.form .check input { margin-top: 6px; }
.form .check label { font-weight: 400; margin: 0; }
.form-note { font-size: 0.88rem; color: var(--muted); margin: 14px 0 0; }

details { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 14px 20px; margin-bottom: 12px; }
summary { cursor: pointer; font-weight: 700; color: var(--slate); }
details p { margin: 10px 0 0; color: var(--muted); }


/* 10. Small screens ----------------------------------------------------- */
@media (max-width: 1000px) {
  .market { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; padding: 14px; gap: 6px; }
  .sidebar h2 { flex: 0 0 100%; padding: 0 8px 10px; }
  .sidebar a { flex: 0 0 auto; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; }
  .sidebar a.all { margin-top: 0; padding-top: 6px; border-top: 1px solid var(--line); }
  .banner { grid-template-columns: 1fr; }
  .banner img { margin: 0; }
  .dept-rows, .steps, .features, .departments { grid-template-columns: repeat(2, 1fr); }
  .trust .wrap { grid-template-columns: repeat(2, 1fr); }
  .trust div:nth-child(3) { border-left: 0; }
  .products, .blog-list, .info-cards { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col, .newsletter .wrap, .split-banner { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.65rem; }
  .banner h1 { font-size: 2rem; }
  .section { padding: 46px 0; }
  .banner, .split-banner { padding: 26px 22px; }
  .promos { grid-template-columns: 1fr; }
  .dept-rows, .steps, .features, .departments, .products, .blog-list, .blog-list-2, .info-cards, .footer-grid { grid-template-columns: 1fr; }
  .trust .wrap { grid-template-columns: 1fr; }
  .trust div { border-left: 0; border-top: 1px solid var(--line); }
  .trust div:first-child { border-top: 0; }
  .site-header { position: static; }
}
