/*
 * Cube House — Cotton-aligned storefront shell
 * Loaded last so both the remote storefront and local quote page share one visual contract.
 */
:root,
[data-theme="light"] {
  color-scheme: light;
  --ph-bg-base: #f7f3ed;
  --ph-bg-surface: #fffdf8;
  --ph-bg-surface-elevated: #dfe9e2;
  --ph-bg-surface-highest: #d3e1d8;
  --ph-border-subtle: rgba(37, 39, 34, 0.14);
  --ph-border-medium: rgba(37, 39, 34, 0.24);
  --ph-border-focus: #53675a;
  --ph-text-primary: #252722;
  --ph-text-secondary: #6f746d;
  --ph-text-tertiary: #90948d;
  --ph-brand-cyan: #91b8a8;
  --ph-brand-blue: #a9bfae;
  --atelier-lime: #cbdccf;
  --atelier-orange: #efd6cb;
  --atelier-ink: #252722;
  --atelier-grid: transparent;
  --ph-shadow-card: 0 18px 45px rgba(48, 58, 51, 0.08);
  --ph-shadow-hover: 0 24px 55px rgba(48, 58, 51, 0.13);
  --ph-font-display: "Gowun Dodum", "Noto Sans KR", sans-serif;
  --ph-font-sans: "DM Sans", "Noto Sans KR", sans-serif;
}

.ph-card [data-product-detail-link] {
  cursor: pointer;
}

.ph-card [data-product-detail-link]:focus-visible {
  outline: 2px solid #526d62;
  outline-offset: 4px;
}

html {
  scroll-padding-top: 84px;
  background: var(--ph-bg-base);
}

body,
.ph-shell,
.ph-storefront-root,
.tp-page {
  background: var(--ph-bg-base);
  color: var(--ph-text-primary);
  font-family: var(--ph-font-sans);
}

body::before,
.ph-announcement-bar {
  display: none !important;
}

.ph-store-tab-nav {
  display: none !important;
}

/* Cotton-style top navigation */
body:not(.ph-admin-app) {
  padding-left: 0 !important;
}

.ph-navbar-wrap,
[data-theme="light"] .ph-navbar-wrap {
  position: sticky !important;
  z-index: 100;
  inset: 0 0 auto !important;
  width: 100% !important;
  border: 0;
  border-bottom: 1px solid var(--ph-border-subtle);
  background: rgba(247, 243, 237, 0.94);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.ph-navbar-wrap > .ph-container {
  width: 100%;
  max-width: none;
  height: auto !important;
  padding-inline: clamp(18px, 3.8vw, 68px) !important;
}

.ph-navbar {
  display: flex !important;
  height: 84px !important;
  min-height: 84px;
  align-items: center !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  gap: clamp(14px, 2vw, 30px);
  padding: 0 !important;
}

.ph-brand-logo {
  flex: 0 0 auto;
  align-items: center !important;
  gap: 10px;
}

.ph-brand-symbol {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(83, 103, 90, 0.16);
  border-radius: 50%;
  background: #eef5ef;
  box-shadow: none;
}

.ph-brand-name {
  color: var(--ph-text-primary);
  font-family: var(--ph-font-sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ph-brand-sub {
  max-width: none !important;
  margin-top: 3px;
  color: var(--ph-text-tertiary);
  font-family: var(--ph-font-sans);
  font-size: calc(8px + 1pt) !important;
  letter-spacing: 0.14em;
}

.ph-nav-links {
  display: flex;
  width: auto !important;
  align-items: center !important;
  flex-direction: row !important;
  gap: 2px !important;
  margin: 0 !important;
}

.ph-nav-links::before {
  display: none !important;
}

.ph-nav-links li,
.ph-nav-link-btn {
  width: auto !important;
}

.ph-navbar-wrap .ph-nav-link-btn {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  border-radius: 999px;
  padding: 0 12px;
  color: var(--ph-text-secondary);
  font-size: calc(11px + 1pt);
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.ph-navbar-wrap .ph-nav-link-btn::before {
  display: none;
}

.ph-navbar-wrap .ph-nav-link-btn:hover,
.ph-navbar-wrap .ph-nav-link-btn:focus-visible {
  background: var(--ph-bg-surface-elevated);
  color: var(--ph-text-primary);
}

.ph-navbar-wrap .ph-nav-link-btn.active {
  background: #d7e5db;
  color: var(--ph-text-primary);
}

.ph-nav-actions {
  display: flex !important;
  width: auto !important;
  flex: 0 0 auto;
  align-items: center !important;
  flex-direction: row !important;
  gap: 8px !important;
  margin: 0 0 0 auto !important;
}

.ph-theme-toggle {
  display: none !important;
}

.ph-account-button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--ph-border-medium);
  border-radius: 999px;
  padding: 0 14px;
  color: var(--ph-text-primary);
  background: rgba(255, 253, 248, 0.76);
  font-size: calc(10px + 1pt);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.ph-account-button:hover,
.ph-account-button:focus-visible {
  border-color: #53675a;
  color: #fff;
  background: #53675a;
}

.ph-navbar-wrap .ph-btn-kakao-nav {
  width: auto !important;
  min-height: 40px;
  height: 40px;
  border: 1px solid #252722;
  border-radius: 999px;
  padding-inline: 14px;
  color: #252722;
  background: transparent;
  box-shadow: none;
  font-size: calc(10px + 1pt);
}

/* Editorial storefront hero */
.ph-store-hero {
  padding: 0;
}

.ph-store-hero > .ph-container {
  width: 100%;
  max-width: none;
  padding: 0;
}

.ph-store-hero-card {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(440px, 1.08fr);
  grid-template-rows: 1fr auto;
  min-height: min(720px, calc(100svh - 84px));
  gap: 24px 54px;
  border: 0;
  border-bottom: 1px solid var(--ph-border-subtle);
  border-radius: 0;
  padding: clamp(54px, 7vw, 104px) clamp(28px, 5.2vw, 84px);
  background: #eef3ee;
  box-shadow: none;
  overflow: hidden;
}

.ph-store-hero-card::before,
.ph-store-hero-card::after {
  display: none;
}

.ph-cube-concept-image {
  position: relative !important;
  z-index: 1;
  inset: auto !important;
  grid-column: 2;
  grid-row: 1 / 3;
  width: 100% !important;
  height: 100% !important;
  min-height: 520px;
  border-radius: 2px;
  object-fit: cover;
  box-shadow: none;
}

.ph-store-hero-left {
  z-index: 2;
  grid-column: 1;
  grid-row: 1;
  width: 100% !important;
  max-width: 620px !important;
  align-self: end;
}

.ph-store-tag,
.ph-section-eyebrow,
.tp-eyebrow,
.tp-step-label {
  color: #657d6d;
  font-size: calc(10px + 1pt);
  font-weight: 700;
  letter-spacing: 0.15em;
}

.ph-store-tag::before,
.ph-section-eyebrow::before,
.tp-eyebrow::before,
.tp-step-label::before {
  width: 5px;
  height: 5px;
  box-shadow: none;
}

.ph-storefront-root .ph-store-title,
.ph-store-title {
  max-width: 620px;
  margin-bottom: 24px;
  color: var(--ph-text-primary);
  font-family: var(--ph-font-display);
  font-size: clamp(2.6rem, 4.2vw, 4.7rem);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.055em;
  word-break: keep-all;
}

.ph-storefront-root .ph-store-desc,
.ph-store-desc {
  max-width: 540px;
  margin: 0 0 28px;
  color: var(--ph-text-secondary);
  font-size: 14px;
  line-height: 1.8;
}

.ph-store-badges {
  gap: 7px;
}

.ph-store-pill {
  border: 1px solid var(--ph-border-subtle);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.64);
  padding: 7px 10px;
  color: var(--ph-text-secondary);
  font-size: calc(9px + 1pt);
}

.ph-store-hero-right {
  z-index: 2;
  grid-column: 1;
  grid-row: 2;
  align-self: start;
  margin: 0 !important;
}

.ph-btn-showroom-cta {
  width: auto !important;
  height: auto !important;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  color: #fff;
  background: #53675a;
  box-shadow: none;
  font-family: var(--ph-font-sans);
  font-size: calc(11px + 1pt);
  white-space: nowrap;
}

.ph-btn-showroom-cta:hover {
  color: #fff;
  background: #405246;
  transform: none;
}

/* Cotton-like catalog rhythm */
.ph-catalog-section {
  padding: clamp(70px, 8vw, 110px) clamp(18px, 3.8vw, 68px) 120px;
}

.ph-catalog-section > .ph-container {
  max-width: 1500px;
  padding: 0;
}

.ph-catalog-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.58fr);
  align-items: end;
  gap: 32px;
  margin-bottom: 36px;
}

.ph-catalog-main-title,
.ph-section-title,
.ph-storefront-root .ph-catalog-main-title,
.ph-storefront-root .ph-section-title {
  color: var(--ph-text-primary);
  font-family: var(--ph-font-display);
  font-size: clamp(2rem, 3.4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.14;
  letter-spacing: -0.045em;
}

.ph-catalog-sub-text,
.ph-section-subtitle,
.ph-section-desc {
  color: var(--ph-text-secondary);
  font-size: 13px;
  line-height: 1.75;
}

.ph-category-tabs {
  gap: 18px;
  border-bottom: 1px solid var(--ph-border-subtle);
  padding-bottom: 12px;
}

.ph-category-tab {
  min-height: 36px;
  border: 0;
  border-radius: 0;
  padding: 0;
  color: var(--ph-text-tertiary);
  background: transparent;
  font-size: calc(10px + 1pt);
}

.ph-category-tab.active {
  border-bottom: 1px solid currentColor;
  color: var(--ph-text-primary);
  background: transparent;
}

.ph-catalog-controls {
  position: static !important;
  margin: 18px 0 28px;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.ph-search-bar,
.ph-sort-select,
.ph-material-select {
  min-height: 46px;
  border: 1px solid var(--ph-border-subtle);
  border-radius: 0;
  background: var(--ph-bg-surface);
}

.ph-products-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  grid-auto-flow: row;
  gap: 46px 14px;
}

.ph-products-grid > .ph-card,
.ph-products-grid > .ph-card:first-child,
.ph-products-grid > .ph-card:nth-child(6) {
  grid-column: auto !important;
  grid-row: auto !important;
}

.ph-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ph-card:hover {
  border: 0;
  box-shadow: none;
  transform: none;
}

.ph-card-thumb-wrap,
.ph-products-grid > .ph-card:first-child .ph-card-thumb-wrap,
.ph-products-grid > .ph-card:nth-child(6) .ph-card-thumb-wrap {
  aspect-ratio: 4 / 5;
  padding-top: 0 !important;
  border-radius: 1px;
  background: #e8eee9;
  overflow: hidden;
}

.ph-card-thumb {
  object-fit: cover;
  filter: saturate(0.88);
}

.ph-card:hover .ph-card-thumb {
  filter: saturate(1);
  transform: scale(1.02);
}

.ph-card-body {
  padding: 14px 2px 0;
}

.ph-card-category {
  margin-bottom: 7px;
  color: var(--ph-text-tertiary);
  font-size: calc(9px + 1pt);
}

.ph-card-title,
.ph-products-grid > .ph-card:first-child .ph-card-title,
.ph-storefront-root .ph-card-title,
.ph-storefront-root .ph-products-grid > .ph-card:first-child .ph-card-title {
  min-height: 2.8em;
  margin-bottom: 9px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.ph-spec-chip {
  background: #e9eee9;
  font-size: calc(8px + 1pt);
}

.ph-card-price-row {
  margin-bottom: 12px;
  padding-top: 10px;
}

.ph-price-value {
  font-size: 15px;
}

.ph-btn-naver-pay,
.ph-btn-toss-card,
.ph-btn-quickview {
  min-height: 40px;
  border-radius: 999px;
  box-shadow: none;
  font-size: calc(9px + 1pt);
}

.ph-btn-toss-card,
.ph-btn-quickview {
  border-color: var(--ph-border-subtle);
  background: var(--ph-bg-surface);
}

/* Quote and other Cube-owned pages */
.tp-page {
  background:
    radial-gradient(circle at 12% 8%, rgba(209, 225, 215, 0.48), transparent 28rem),
    var(--ph-bg-base);
}

.tp-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.72fr);
  min-height: auto;
  align-items: end;
  gap: clamp(34px, 6vw, 90px);
  padding: clamp(64px, 8vw, 112px) clamp(18px, 3.8vw, 68px);
}

.tp-intro h1 {
  max-width: 720px;
  font-family: var(--ph-font-display);
  font-size: clamp(2.5rem, 4.2vw, 4.4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.055em;
}

.tp-intro-copy {
  color: var(--ph-text-secondary);
  font-size: 14px;
  line-height: 1.85;
}

.tp-process,
.tp-card,
.ph-material-card,
.ph-faq-item {
  border: 1px solid var(--ph-border-subtle);
  border-radius: 2px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: none;
}

.tp-process li {
  min-height: 86px;
}

.tp-workspace {
  gap: 16px;
  padding-inline: clamp(18px, 3.8vw, 68px);
}

.tp-drop-zone {
  border-color: var(--ph-border-medium);
  border-radius: 2px;
  background: #edf3ee;
}

.ph-footer {
  border-top: 1px solid var(--ph-border-subtle);
  background: #eef1eb;
}

.ph-footer-link,
.ph-footer-col-title,
.ph-footer-bottom,
.tp-footer-guarantee {
  color: var(--ph-text-secondary);
}

@media (max-width: 1180px) and (min-width: 769px) {
  .ph-navbar-wrap .ph-nav-link-btn {
    padding-inline: 8px;
    font-size: calc(10px + 1pt);
  }

  .ph-navbar-wrap .ph-btn-kakao-nav {
    display: none;
  }
}

@media (max-width: 900px) {
  .ph-store-hero-card {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 0.92fr);
    padding-inline: 28px;
  }

  .ph-products-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .tp-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  html {
    scroll-padding-top: 68px;
  }

  .ph-navbar-wrap > .ph-container {
    padding-inline: 16px !important;
  }

  .ph-navbar {
    height: 68px !important;
    min-height: 68px;
  }

  .ph-brand-symbol {
    flex-basis: 36px;
    width: 36px;
    height: 36px;
  }

  .ph-brand-sub {
    display: none;
  }

  .ph-nav-links,
  .ph-nav-actions .ph-account-button,
  .ph-nav-actions .ph-btn-kakao-nav {
    display: none !important;
  }

  .ph-nav-actions {
    margin-left: auto !important;
  }

  .ph-hamburger-btn {
    display: inline-flex !important;
    width: 44px;
    height: 44px;
    border: 1px solid var(--ph-border-subtle);
    color: var(--ph-text-primary);
    background: transparent;
  }

  .ph-mobile-drawer {
    border-bottom: 1px solid var(--ph-border-subtle);
    padding: 8px 16px 18px;
    color: var(--ph-text-primary);
    background: rgba(247, 243, 237, 0.98);
  }

  .ph-mobile-drawer.open {
    display: grid;
  }

  .ph-mobile-nav-btn {
    min-height: 46px;
    border-bottom: 1px solid var(--ph-border-subtle);
    padding: 12px 4px;
    color: var(--ph-text-primary);
    font-size: calc(12px + 1pt);
  }

  .ph-store-hero-card {
    display: flex;
    min-height: auto;
    flex-direction: column;
    gap: 20px;
    padding: 18px 16px 38px;
  }

  .ph-cube-concept-image {
    order: -1;
    width: 100% !important;
    height: clamp(280px, 78vw, 520px) !important;
    min-height: 0;
  }

  .ph-store-hero-left,
  .ph-store-hero-right {
    width: 100% !important;
    max-width: 100% !important;
  }

  .ph-storefront-root .ph-store-title,
  .ph-store-title {
    font-size: clamp(2rem, 9vw, 3rem);
    line-height: 1.13;
  }

  .ph-storefront-root .ph-store-desc,
  .ph-store-desc {
    font-size: 13px;
  }

  .ph-btn-showroom-cta {
    width: 100% !important;
  }

  .ph-catalog-section {
    padding: 64px 10px 90px;
  }

  .ph-catalog-title-row {
    grid-template-columns: 1fr;
    gap: 18px;
    padding-inline: 6px;
  }

  .ph-category-tabs {
    margin-inline: -10px;
    padding-inline: 16px;
  }

  .ph-products-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 38px 7px;
  }

  .ph-card-body {
    padding: 10px 3px 0;
  }

  .ph-card-title,
  .ph-products-grid > .ph-card:first-child .ph-card-title,
  .ph-storefront-root .ph-card-title,
  .ph-storefront-root .ph-products-grid > .ph-card:first-child .ph-card-title {
    min-height: 3em;
    font-size: calc(11px + 1pt);
  }

  .ph-card-actions,
  .ph-card-dual-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .ph-card-actions :where(a, button),
  .ph-card-dual-actions :where(a, button) {
    min-height: 38px;
    font-size: calc(8px + 1pt);
  }

  .tp-intro {
    gap: 28px;
    padding-block: 56px;
  }

  .tp-intro h1 {
    font-size: clamp(2rem, 9vw, 3rem);
  }

  .tp-workspace {
    padding-inline: 12px;
  }
}

@media (max-width: 390px) {
  .ph-brand-name {
    font-size: calc(11px + 1pt);
  }

  .ph-store-badges {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ph-card,
  .ph-card-thumb,
  .ph-btn-showroom-cta {
    transition: none;
  }
}
