/*
Theme Name: Edelstin
Author: Edelstin
Description: Product-first WooCommerce theme for the Edelstin jewelry store.
Version: 0.2.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: edelstin
*/

:root {
  --ed-ink: #141414;
  --ed-paper: #ffffff;
  --ed-mist: #f2f4f3;
  --ed-line: #d9dddb;
  --ed-emerald: #0e6b58;
  --ed-emerald-dark: #084d40;
  --ed-coral: #c85848;
  --ed-muted: #626866;
  --ed-width: 1240px;
  --ed-radius: 4px;
  --ed-shadow: 0 12px 32px rgba(14, 25, 21, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ed-ink);
  background: var(--ed-paper);
  font-family: Pretendard, "Noto Sans KR", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

:focus-visible {
  outline: 3px solid var(--ed-coral);
  outline-offset: 3px;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ed-shell {
  width: min(calc(100% - 40px), var(--ed-width));
  margin-inline: auto;
}

.ed-site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(217, 221, 219, 0.85);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}

.admin-bar .ed-site-header {
  top: 32px;
}

.ed-header-row {
  min-height: 72px;
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto minmax(150px, 1fr);
  align-items: center;
  gap: 24px;
}

.ed-brand {
  display: inline-flex;
  flex-direction: column;
  justify-self: start;
  text-decoration: none;
  line-height: 1.1;
}

.ed-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  font-weight: 600;
}

.ed-brand small {
  margin-top: 5px;
  color: var(--ed-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.ed-main-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-main-nav a {
  display: block;
  padding-block: 24px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.ed-main-nav a:hover {
  color: var(--ed-emerald);
}

.ed-header-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ed-icon-link {
  min-width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  background: var(--ed-paper);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.ed-icon-link:hover {
  border-color: var(--ed-emerald);
  color: var(--ed-emerald);
}

.ed-hero {
  position: relative;
  min-height: min(78vh, 760px);
  display: grid;
  align-items: center;
  overflow: hidden;
  color: #ffffff;
  background-color: #171918;
  background-image: url("assets/campaign-hero.png");
  background-position: center center;
  background-size: cover;
}

.ed-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.ed-hero-copy {
  position: relative;
  z-index: 1;
  width: min(540px, 47%);
  padding-block: 96px;
}

.ed-eyebrow {
  margin: 0 0 14px;
  color: #d9fff4;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.ed-hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
}

.ed-hero p:not(.ed-eyebrow) {
  max-width: 440px;
  margin: 24px 0 0;
  font-size: 18px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.ed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.ed-button,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border: 1px solid var(--ed-emerald);
  border-radius: var(--ed-radius);
  color: #ffffff;
  background: var(--ed-emerald);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.ed-button:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover {
  color: #ffffff;
  background: var(--ed-emerald-dark);
}

.ed-button--light {
  border-color: #ffffff;
  color: var(--ed-ink);
  background: #ffffff;
}

.ed-button--light:hover {
  border-color: #d9fff4;
  color: var(--ed-ink);
  background: #d9fff4;
}

.ed-intro-strip {
  border-bottom: 1px solid var(--ed-line);
  background: var(--ed-mist);
}

.ed-intro-grid {
  min-height: 120px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
}

.ed-intro-item {
  min-height: 64px;
  display: grid;
  align-content: center;
  padding: 16px 30px;
  border-right: 1px solid var(--ed-line);
}

.ed-intro-item:first-child {
  padding-left: 0;
}

.ed-intro-item:last-child {
  border-right: 0;
}

.ed-intro-item strong {
  font-size: 15px;
}

.ed-intro-item span {
  margin-top: 3px;
  color: var(--ed-muted);
  font-size: 13px;
}

.ed-section {
  padding-block: 88px;
}

.ed-section--muted {
  background: var(--ed-mist);
}

.ed-section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 34px;
}

.ed-section-heading h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.15;
}

.ed-section-heading p {
  max-width: 500px;
  margin: 8px 0 0;
  color: var(--ed-muted);
}

.ed-text-link {
  color: var(--ed-emerald-dark);
  font-weight: 800;
  white-space: nowrap;
}

.ed-collection-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ed-collection {
  position: relative;
  min-height: 260px;
  display: flex;
  align-items: end;
  padding: 24px;
  overflow: hidden;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  color: #ffffff;
  background: #262a28;
  text-decoration: none;
}

.ed-collection:nth-child(2) {
  background: var(--ed-emerald-dark);
}

.ed-collection:nth-child(3) {
  background: #424746;
}

.ed-collection:nth-child(4) {
  background: var(--ed-coral);
}

.ed-collection span {
  position: relative;
  z-index: 1;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

.ed-collection:hover {
  box-shadow: var(--ed-shadow);
  transform: translateY(-2px);
}

.woocommerce ul.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 26px 18px;
  margin: 0;
  padding: 0;
}

.woocommerce ul.products::before,
.woocommerce ul.products::after {
  display: none;
}

.woocommerce ul.products li.product {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
}

.woocommerce ul.products li.product a img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  margin: 0 0 14px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  background: var(--ed-mist);
}

.woocommerce ul.products li.product .woocommerce-loop-product__title {
  min-height: 48px;
  padding: 0;
  font-size: 15px;
  line-height: 1.55;
}

.woocommerce ul.products li.product .price {
  color: var(--ed-ink);
  font-size: 15px;
  font-weight: 800;
}

.woocommerce ul.products li.product .button {
  width: 100%;
  margin-top: 12px;
}

.ed-empty-products {
  padding: 34px;
  border: 1px solid var(--ed-line);
  background: var(--ed-paper);
  text-align: center;
}

.ed-story-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 70px;
  align-items: center;
}

.ed-story-mark {
  min-height: 360px;
  display: grid;
  place-items: center;
  color: #ffffff;
  background: var(--ed-emerald-dark);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 64px;
}

.ed-story-copy h2 {
  margin: 0 0 20px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
}

.ed-story-copy p {
  margin: 0 0 16px;
  color: #3f4543;
}

.ed-content {
  min-height: 56vh;
  padding-block: 64px 96px;
}

.ed-content > * {
  max-width: 840px;
  margin-inline: auto;
}

.ed-content .woocommerce {
  max-width: var(--ed-width);
}

.edelstin-product-facts {
  width: 100%;
  border-collapse: collapse;
}

.edelstin-product-facts th,
.edelstin-product-facts td {
  padding: 12px;
  border-bottom: 1px solid var(--ed-line);
  text-align: left;
  vertical-align: top;
}

.edelstin-product-facts th {
  width: 120px;
  color: var(--ed-muted);
}

.edelstin-note {
  padding: 16px;
  border-left: 4px solid var(--ed-coral);
  background: var(--ed-mist);
  font-size: 14px;
}

.woocommerce form .form-row {
  margin-bottom: 18px;
}

.woocommerce form .form-row label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
}

.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.woocommerce .quantity .qty {
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  background: var(--ed-paper);
}

.woocommerce-account .woocommerce {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 36px;
}

.woocommerce-account .woocommerce-MyAccount-navigation {
  width: auto;
  float: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  margin: 0;
  padding: 0;
  border: 1px solid var(--ed-line);
  list-style: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--ed-line);
  text-decoration: none;
}

.woocommerce-account .woocommerce-MyAccount-navigation li:last-child a {
  border-bottom: 0;
}

.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
  color: #ffffff;
  background: var(--ed-emerald);
}

.woocommerce-account .woocommerce-MyAccount-content {
  width: auto;
  float: none;
}

.woocommerce table.shop_table {
  border: 1px solid var(--ed-line);
  border-collapse: collapse;
  border-radius: 0;
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 14px;
  border-color: var(--ed-line);
}

.woocommerce-cart .cart-collaterals .cart_totals,
.woocommerce-checkout-review-order {
  padding: 22px;
  border: 1px solid var(--ed-line);
  background: var(--ed-mist);
}

.woocommerce-checkout #customer_details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
  width: auto;
  float: none;
}

.woocommerce-error,
.woocommerce-info,
.woocommerce-message {
  border-top-color: var(--ed-emerald);
  background: var(--ed-mist);
}

.ed-site-footer {
  padding-block: 48px;
  color: #e9efec;
  background: #171918;
}

.ed-footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 50px;
}

.ed-footer-title {
  margin: 0 0 14px;
  color: #ffffff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

.ed-site-footer p,
.ed-site-footer li {
  color: #b9c2be;
  font-size: 13px;
}

.ed-site-footer ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-site-footer a:hover {
  color: #ffffff;
}

@media (max-width: 960px) {
  .ed-header-row {
    grid-template-columns: 1fr auto;
  }

  .ed-main-nav {
    grid-column: 1 / -1;
    order: 3;
    overflow-x: auto;
  }

  .ed-main-nav ul {
    justify-content: flex-start;
  }

  .ed-main-nav a {
    padding-block: 12px 16px;
    white-space: nowrap;
  }

  .ed-hero {
    min-height: 680px;
    background-position: 62% center;
  }

  .ed-hero-copy {
    width: min(500px, 66%);
  }

  .ed-collection-grid,
  .woocommerce ul.products {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ed-story-grid {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

@media (max-width: 680px) {
  .admin-bar .ed-site-header {
    top: 46px;
  }

  .ed-shell {
    width: min(calc(100% - 28px), var(--ed-width));
  }

  .ed-header-row {
    min-height: 62px;
    gap: 12px;
  }

  .ed-main-nav {
    scrollbar-width: none;
  }

  .ed-main-nav::-webkit-scrollbar {
    display: none;
  }

  .ed-main-nav ul {
    gap: 9px;
  }

  .ed-main-nav a {
    font-size: 13px;
  }

  .ed-brand strong {
    font-size: 21px;
  }

  .ed-header-tools .ed-icon-link:first-child {
    display: none;
  }

  .ed-hero {
    min-height: 680px;
    align-items: end;
    background-position: 68% center;
  }

  .ed-hero::before {
    background: rgba(0, 0, 0, 0.42);
  }

  .ed-hero-copy {
    width: 100%;
    padding-block: 280px 54px;
  }

  .ed-hero h1 {
    font-size: 52px;
  }

  .ed-hero p:not(.ed-eyebrow) {
    max-width: 350px;
    font-size: 16px;
  }

  .ed-intro-grid {
    grid-template-columns: 1fr;
    padding-block: 10px;
  }

  .ed-intro-item,
  .ed-intro-item:first-child {
    min-height: 72px;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--ed-line);
  }

  .ed-intro-item:last-child {
    border-bottom: 0;
  }

  .ed-section {
    padding-block: 58px;
  }

  .ed-section-heading {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 24px;
  }

  .ed-section-heading h2,
  .ed-story-copy h2 {
    font-size: 32px;
  }

  .ed-collection-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ed-collection {
    min-height: 180px;
    padding: 16px;
  }

  .ed-collection span {
    font-size: 22px;
  }

  .woocommerce ul.products {
    gap: 24px 10px;
  }

  .woocommerce ul.products li.product .woocommerce-loop-product__title {
    min-height: 66px;
    font-size: 14px;
  }

  .woocommerce ul.products li.product .button {
    min-height: 42px;
    padding-inline: 8px;
    font-size: 13px;
  }

  .ed-story-grid,
  .ed-footer-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .woocommerce-account .woocommerce,
  .woocommerce-checkout #customer_details {
    grid-template-columns: 1fr;
  }

  .ed-story-mark {
    min-height: 220px;
    font-size: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  * {
    transition: none !important;
  }
}
