﻿/*
Theme Name: IdolFoundry Checkout Shell
Theme URI: https://idolfoundry.com
Author: IdolFoundry
Description: Lightweight checkout theme that mirrors the IdolFoundry Next.js shell for WooCommerce pages.
Version: 2.0.0
Text Domain: idolfoundry
*/

:root {
  --if-bg: #f6f8fc;
  --if-surface: #ffffff;
  --if-surface-soft: #eef3fb;
  --if-surface-ghost: #f8fbff;
  --if-text: #111827;
  --if-muted: #667085;
  --if-border: rgba(17, 24, 39, 0.10);
  --if-border-strong: rgba(17, 24, 39, 0.16);
  --if-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
  --if-shadow-soft: 0 8px 20px rgba(15, 23, 42, 0.05);
  --if-radius: 20px;
  --if-radius-sm: 14px;
  --if-content-width: min(1680px, calc(100vw - 32px));
  --if-content-narrow: min(1200px, calc(100vw - 32px));
  --if-accent: #4f46e5;
  --if-accent-strong: #4338ca;
}

* {
  box-sizing: border-box;
}

html {
  margin: 0;
}

body {
  margin: 0;
  background: var(--if-bg);
  color: var(--if-text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  line-height: 1.6;
}

body.logged-in {
  --if-admin-offset: 32px;
}

@media (max-width: 782px) {
  body.logged-in {
    --if-admin-offset: 46px;
  }
}

a {
  color: inherit;
}

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

.if-site-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.if-header {
  position: sticky;
  top: var(--if-admin-offset, 0px);
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(17, 24, 39, 0.08);
}

.if-header__inner {
  width: var(--if-content-width);
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 10px 0;
}

.if-header__brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  flex-shrink: 0;
}

.if-header__brand img {
  width: 200px;
  height: auto;
}

.if-header__nav {
  display: flex;
  align-items: center;
  gap: 22px;
}

.if-header__nav a,
.if-header__utility a,
.if-header__utility button {
  text-decoration: none;
  color: var(--if-text);
  position: relative;
  font-size: 18px;
  border: 0;
  background: transparent;
  padding: 0;
  font: inherit;
}

.if-header__nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.25s ease;
}

.if-header__nav a:hover::after,
.if-header__nav a:focus-visible::after {
  width: 100%;
}

.if-header__search {
  margin-left: auto;
  display: flex;
  align-items: center;
  min-width: min(28vw, 320px);
  flex: 0 1 320px;
  background: var(--if-surface-soft);
  border-radius: 8px;
  padding: 8px 12px;
  border: 1px solid var(--if-border-strong);
}

.if-header__search input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--if-text);
  font-size: 15px;
  outline: none;
}

.if-header__search-icon {
  color: var(--if-muted);
  font-size: 18px;
  line-height: 1;
}

.if-header__utility {
  display: flex;
  align-items: center;
  gap: 14px;
}

.if-header__cart {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
}

.if-header__cart svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.if-header__account {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--if-border-strong);
  background: var(--if-surface);
  box-shadow: var(--if-shadow-soft);
  font-size: 16px;
}

.if-main {
  flex: 1;
  width: 100%;
}

.if-main .alignwide,
.if-main .alignfull,
.if-main .wp-block-group__inner-container {
  max-width: none;
}

.if-container {
  width: var(--if-content-narrow);
  margin: 0 auto;
  padding: 28px 0 52px;
}

.if-entry,
.woocommerce .woocommerce-notices-wrapper,
.woocommerce .woocommerce-cart-form,
.woocommerce .cart-collaterals,
.woocommerce form.checkout,
.woocommerce-account .woocommerce,
.woocommerce-order,
.woocommerce-checkout-review-order,
.woocommerce-form-coupon,
.woocommerce-form-login,
.woocommerce-MyAccount-content,
.woocommerce-page .woocommerce,
.woocommerce-page form.checkout_coupon,
.woocommerce-page form.login,
.woocommerce-page form.register {
  background: var(--if-surface);
  border: 1px solid var(--if-border);
  border-radius: var(--if-radius);
  box-shadow: var(--if-shadow);
}

.if-entry {
  padding: 32px;
}

.if-entry > *:first-child,
.if-entry-content > *:first-child {
  margin-top: 0;
}

.if-entry > *:last-child,
.if-entry-content > *:last-child {
  margin-bottom: 0;
}

.if-page-title,
.woocommerce h1,
.woocommerce h2,
.woocommerce h3,
.woocommerce h4,
.entry-title {
  color: var(--if-text);
  letter-spacing: -0.02em;
}

.if-page-title,
.entry-title,
.woocommerce h1 {
  margin: 0 0 18px;
  font-size: clamp(2rem, 4vw, 3rem);
}

.woocommerce .woocommerce-breadcrumb,
.woocommerce .page-title,
.ast-page-builder-template .entry-header,
.ast-container .entry-header {
  display: none;
}

.woocommerce .woocommerce-notices-wrapper {
  margin-bottom: 20px;
  padding: 16px 20px;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
  border-radius: 14px;
  border-top: 0;
  box-shadow: none;
  margin: 0 0 16px;
}

.woocommerce-info {
  background: #eef4ff;
}

.woocommerce-message {
  background: #ecfdf3;
}

.woocommerce-error {
  background: #fef3f2;
}

.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce #payment #place_order,
.wp-block-button__link {
  background: linear-gradient(90deg, #3b82f6, #2563eb) !important;
  color: #fff !important;
  border: 0 !important;
  border-radius: 14px !important;
  min-height: 48px;
  padding: 0 22px !important;
  font-weight: 600 !important;
  box-shadow: 0 16px 30px rgba(59, 130, 246, 0.2);
}

.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce #payment #place_order:hover,
.wp-block-button__link:hover {
  background: linear-gradient(90deg, #4c8ef7, #2f69ec) !important;
}

.woocommerce .quantity .qty,
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce form .form-row select,
.select2-container--default .select2-selection--single,
input[type='text'],
input[type='email'],
input[type='password'],
input[type='search'],
textarea,
select {
  border-radius: 14px;
  border: 1px solid var(--if-border-strong);
  min-height: 48px;
  padding: 10px 14px;
  background: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
  line-height: 28px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
  height: 46px;
}

.woocommerce table.shop_table {
  border-radius: 18px;
  overflow: hidden;
  border-color: var(--if-border);
}

.woocommerce table.shop_table th,
.woocommerce table.shop_table td {
  padding: 16px;
}

.woocommerce-cart .cart-collaterals,
.woocommerce-checkout #customer_details,
.woocommerce-checkout-review-order,
.woocommerce-account .woocommerce,
.woocommerce-order,
.woocommerce .woocommerce-notices-wrapper {
  padding: 24px;
}

.woocommerce .col2-set,
.woocommerce-page .col2-set {
  width: 100%;
  display: grid;
  gap: 24px;
}

.woocommerce-checkout #payment {
  background: #f8faff;
  border-radius: 18px;
}

.woocommerce-checkout #payment div.payment_box {
  background: #fff;
  border-radius: 14px;
}

.woocommerce-checkout #payment div.payment_box::before {
  border-bottom-color: #fff;
}

.woocommerce-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.woocommerce-account .woocommerce-MyAccount-navigation a {
  display: block;
  text-decoration: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--if-surface-soft);
}

.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
  background: var(--if-surface);
  border: 1px solid var(--if-border);
  border-radius: 18px;
  padding: 16px;
  box-shadow: var(--if-shadow-soft);
}

.if-footer {
  background: var(--if-bg);
  padding: 40px clamp(16px, 5vw, 80px) 28px;
}

.if-footer__inner {
  width: min(1200px, calc(100vw - 32px));
  margin: 0 auto;
}

.if-footer__top {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: 'nav brand social';
  align-items: start;
  gap: 32px;
}

.if-footer__col {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  text-align: left;
}

.if-footer__col h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
}

.if-footer__col a,
.if-footer__col p,
.if-footer__col span {
  margin: 0;
  color: var(--if-muted);
  font-weight: 600;
  text-decoration: none;
}

.if-footer__nav {
  grid-area: nav;
}

.if-footer__brand {
  grid-area: brand;
}

.if-footer__social {
  grid-area: social;
}

.if-footer__col a:hover,
.if-footer__col p:hover {
  color: var(--if-text);
}

.if-footer__brand-copy {
  font-weight: 500 !important;
  line-height: 1.6;
}

.if-footer__brand-link {
  display: inline-flex;
  width: fit-content;
  line-height: 0;
  margin-bottom: 4px;
}

.if-footer__brand-link img {
  width: 200px;
  height: auto;
}

.if-footer__bottom {
  max-width: 1200px;
  border-top: 1px solid var(--if-border);
  margin: 30px auto 0;
  padding-top: 15px;
  text-align: center;
  color: var(--if-muted);
  font-size: 14px;
}

.if-footer__bottom p {
  margin: 0;
}

@media (max-width: 1080px) {
  .if-header__search {
    display: none;
  }
}

@media (max-width: 900px) {
  .if-header__inner {
    min-height: 64px;
    gap: 16px;
    flex-wrap: wrap;
  }

  .if-header__brand img {
    width: 150px;
  }

  .if-header__nav {
    order: 3;
    width: 100%;
    justify-content: center;
    padding-bottom: 6px;
    gap: 18px;
  }

  .if-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'brand brand'
      'nav social';
  }

  .if-footer__brand {
    grid-column: auto;
  }
}

@media (max-width: 640px) {
  .if-header__brand img,
  .if-footer__brand-link img {
    width: min(200px, 56vw);
  }

  .if-header__nav {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 2px;
  }

  .if-header__utility {
    margin-left: auto;
  }

  .if-container {
    padding: 20px 0 40px;
  }

  .if-entry,
  .woocommerce-cart .cart-collaterals,
  .woocommerce-checkout #customer_details,
  .woocommerce-checkout-review-order,
  .woocommerce-account .woocommerce,
  .woocommerce-order,
  .woocommerce .woocommerce-notices-wrapper {
    padding: 20px;
  }

  .if-footer {
    padding: 32px 16px;
  }

  .if-footer__top {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      'brand brand'
      'nav social';
    gap: 20px;
  }

  .if-footer__brand {
    grid-column: 1 / -1;
  }
}
