/* Legacy Designs — Vibrant Art Portfolio Theme */
:root {
  --primary:    #C026D3;   /* fuchsia/magenta */
  --primary-dk: #86198F;
  --accent:     #06B6D4;   /* cyan */
  --accent-2:   #F59E0B;   /* amber/gold */
  --dark:       #0F0A1E;
  --dark-2:     #1A1030;
  --surface:    #FFFFFF;
  --surface-2:  #F8F5FF;
  --border:     #E5E7EB;
  --text:       #1F2937;
  --text-muted: #6B7280;
  --radius:     12px;
  --shadow:     0 4px 24px rgba(0,0,0,.12);
  --gradient:   linear-gradient(135deg, #C026D3 0%, #7C3AED 50%, #06B6D4 100%);
}

*,*::before,*::after { box-sizing: border-box; }

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

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dk); text-decoration: underline; }

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

/* ── Rainbow stripe ── */
.rainbow-stripe {
  height: 5px;
  background: linear-gradient(90deg,#E63946,#F4A261,#F1C40F,#2ECC71,#06B6D4,#7C3AED,#C026D3);
}

/* ── Site header ── */
.site-header {
  background: var(--dark);
  padding: 0;
}
.site-header-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.site-header-logo {
  display: flex; align-items: center; gap: 14px;
  text-decoration: none;
}
.site-header-logo img { height: 56px; width: auto; }
.site-header-name {
  color: #fff; font-size: 1.4rem; font-weight: 700; line-height: 1.2;
}
.site-header-name small {
  display: block; font-size: .8rem; font-weight: 400; opacity: .7;
}
.site-header-banner-wrap img {
  width: 100%; max-height: 220px; object-fit: cover;
}
.nav-toggle {
  background: none; border: 2px solid rgba(255,255,255,.3); color: #fff;
  font-size: 1.3rem; padding: 6px 10px; border-radius: 6px; cursor: pointer;
  display: none;
}

/* ── Cart badge in header ── */
.cart-badge {
  position: relative; color: #fff; text-decoration: none;
  font-size: .9rem; display: flex; align-items: center; gap: 6px;
}
.cart-badge-count {
  background: var(--primary); color: #fff; border-radius: 50%;
  width: 20px; height: 20px; font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

/* ── Navigation ── */
.site-nav { background: var(--dark-2); border-bottom: 1px solid rgba(255,255,255,.07); }
.site-nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 0 24px; display: flex; align-items: center; gap: 2px; flex-wrap: wrap;
}
.site-nav-inner a, .nav-parent-btn {
  color: rgba(255,255,255,.82); padding: 12px 14px;
  font-size: .88rem; font-weight: 500; border-radius: 0;
  transition: color .15s, background .15s;
  text-decoration: none; background: none; border: none; cursor: pointer;
}
.site-nav-inner a:hover, .nav-parent-btn:hover,
.site-nav-inner a.current { color: var(--accent); text-decoration: none; }
.nav-item { position: relative; }
.nav-dropdown {
  display: none; position: absolute; top: 100%; left: 0;
  background: var(--dark); border: 1px solid rgba(255,255,255,.1);
  border-radius: 6px; min-width: 170px; z-index: 100;
  box-shadow: var(--shadow);
}
.nav-item.open .nav-dropdown, .nav-item:hover .nav-dropdown { display: block; }
.nav-dropdown a { display: block; padding: 9px 16px; font-size: .86rem; }

/* ── Main & Layout ── */
main { min-height: 60vh; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Hero ── */
.hero {
  background: var(--gradient);
  padding: 80px 24px 90px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 320'%3E%3Cpath fill='rgba(255,255,255,.05)' d='M0,160L60,165.3C120,171,240,181,360,165.3C480,149,600,107,720,112C840,117,960,171,1080,181.3C1200,192,1320,160,1380,144L1440,128L1440,320L1380,320C1320,320,1200,320,1080,320C960,320,840,320,720,320C600,320,480,320,360,320C240,320,120,320,60,320L0,320Z'%3E%3C/path%3E%3C/svg%3E") bottom/cover no-repeat;
}
.hero-content { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800;
  margin: 0 0 16px; letter-spacing: -.02em;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.hero p { font-size: 1.15rem; opacity: .92; margin: 0 0 32px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 12px 24px; border-radius: 8px; font-weight: 600;
  font-size: .95rem; cursor: pointer; border: none;
  transition: all .15s; text-decoration: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dk); color: #fff; text-decoration: none; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #0891B2; color: #fff; text-decoration: none; }
.btn-outline { background: transparent; border: 2px solid #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,.15); color: #fff; text-decoration: none; }
.btn-dark { background: var(--dark); color: #fff; }
.btn-dark:hover { background: var(--dark-2); color: #fff; text-decoration: none; }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--border); text-decoration: none; }
.btn-danger { background: #DC2626; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 6px; }

/* ── Section headings ── */
.section { padding: 60px 24px; }
.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 {
  font-size: 2rem; font-weight: 700; margin: 0 0 10px;
  background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.section-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ── Artwork grid ── */
.artwork-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px;
}
.artwork-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.artwork-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.artwork-card-img { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.artwork-card-img img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s;
}
.artwork-card:hover .artwork-card-img img { transform: scale(1.04); }
.artwork-card-badge {
  position: absolute; top: 10px; right: 10px;
  padding: 4px 10px; border-radius: 20px; font-size: .75rem; font-weight: 700;
}
.badge-available { background: #DCFCE7; color: #166534; }
.badge-sold      { background: #FEE2E2; color: #991B1B; }
.badge-digital   { background: #DBEAFE; color: #1E40AF; }
.artwork-card-body { padding: 16px; }
.artwork-card-cat {
  font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--primary); margin-bottom: 6px;
}
.artwork-card-title { font-size: 1rem; font-weight: 700; margin: 0 0 6px; color: var(--text); }
.artwork-card-meta { font-size: .82rem; color: var(--text-muted); margin-bottom: 10px; }
.artwork-card-price { font-size: 1.1rem; font-weight: 700; color: var(--primary); }
.artwork-card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-top: 1px solid var(--border);
}

/* ── Portfolio filter tabs ── */
.filter-tabs {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 32px; justify-content: center;
}
.filter-tab {
  padding: 8px 18px; border-radius: 20px; font-size: .88rem; font-weight: 500;
  cursor: pointer; border: 2px solid var(--border);
  color: var(--text-muted); background: var(--surface);
  text-decoration: none; transition: all .15s;
}
.filter-tab:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.filter-tab.active {
  background: var(--primary); color: #fff; border-color: var(--primary);
}

/* ── Single artwork page ── */
.artwork-detail { max-width: 1100px; margin: 0 auto; padding: 40px 24px; }
.artwork-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.artwork-main-img {
  border-radius: var(--radius); overflow: hidden; cursor: zoom-in;
  box-shadow: var(--shadow);
}
.artwork-main-img img { width: 100%; height: auto; }
.artwork-gallery-thumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.artwork-gallery-thumbs img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 6px; cursor: pointer; border: 2px solid transparent;
  transition: border-color .15s;
}
.artwork-gallery-thumbs img.active { border-color: var(--primary); }
.artwork-info h1 { font-size: 1.9rem; font-weight: 800; margin: 0 0 10px; }
.artwork-price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin: 16px 0; }
.artwork-meta-table { border-collapse: collapse; width: 100%; margin-bottom: 20px; }
.artwork-meta-table td { padding: 6px 0; font-size: .9rem; }
.artwork-meta-table td:first-child { color: var(--text-muted); width: 110px; }
.artwork-desc { line-height: 1.7; color: var(--text); margin-bottom: 24px; }

/* ── Cart page ── */
.cart-wrap { max-width: 900px; margin: 0 auto; padding: 40px 24px; }
.cart-table { width: 100%; border-collapse: collapse; margin-bottom: 24px; }
.cart-table th { text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--border); font-size: .85rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.cart-item-img { width: 70px; height: 70px; object-fit: cover; border-radius: 6px; }
.cart-item-title { font-weight: 600; }
.cart-totals { display: flex; justify-content: flex-end; }
.cart-totals-box { min-width: 280px; }
.cart-totals-row { display: flex; justify-content: space-between; padding: 8px 0; }
.cart-totals-total { font-size: 1.2rem; font-weight: 700; border-top: 2px solid var(--border); padding-top: 12px; margin-top: 4px; }

/* ── Checkout ── */
.checkout-wrap { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.checkout-section {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px; margin-bottom: 24px;
}
.checkout-section h2 { font-size: 1.1rem; font-weight: 700; margin: 0 0 20px; }
.payment-methods { display: flex; gap: 12px; margin-bottom: 24px; flex-wrap: wrap; }
.payment-method {
  flex: 1; min-width: 140px; border: 2px solid var(--border); border-radius: 8px;
  padding: 14px 18px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  font-weight: 600; font-size: .9rem; background: var(--surface); transition: all .15s;
}
.payment-method.selected { border-color: var(--primary); background: rgba(192,38,211,.05); }
#paypal-button-container { min-height: 50px; }

/* ── Commission form ── */
.commission-wrap { max-width: 780px; margin: 0 auto; padding: 40px 24px; }
.commission-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-bottom: 40px; }
.commission-info-card {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; text-align: center;
}
.commission-info-card .icon { font-size: 2rem; margin-bottom: 8px; }
.commission-info-card h3 { margin: 0 0 6px; font-size: 1rem; }
.commission-info-card p { margin: 0; font-size: .88rem; color: var(--text-muted); }

/* ── Forms ── */
.form-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px;
  max-width: 680px; margin: 0 auto;
}
.form-header { text-align: center; margin-bottom: 28px; }
.form-header h1 { font-size: 1.8rem; font-weight: 700; margin: 0 0 8px; }
.form-header p { color: var(--text-muted); margin: 0; }
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 6px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border); border-radius: 8px;
  font-size: .95rem; font-family: inherit;
  transition: border-color .15s; background: var(--surface);
}
.form-control:focus { outline: none; border-color: var(--primary); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-submit { margin-top: 24px; }
.req { color: var(--primary); }
.form-alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 18px;
  font-size: .92rem;
}
.form-alert-success { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.form-alert-error   { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }

/* ── Static pages ── */
.page-wrap { max-width: 800px; margin: 0 auto; padding: 40px 24px; }
.page-wrap h1 { font-size: 2rem; font-weight: 800; margin-bottom: 24px; }
.page-content { line-height: 1.8; }
.page-content h2 { font-size: 1.4rem; margin-top: 32px; }
.page-content img { border-radius: var(--radius); margin: 16px 0; }

/* ── Footer ── */
.site-footer { background: var(--dark); color: rgba(255,255,255,.8); margin-top: 60px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto; padding: 48px 24px 32px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px;
}
.footer-col h3 { color: #fff; font-size: .95rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 14px; }
.footer-col a, .footer-col address {
  display: block; color: rgba(255,255,255,.7); font-size: .88rem;
  text-decoration: none; margin-bottom: 6px; font-style: normal;
}
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  text-align: center; padding: 16px 24px;
  font-size: .82rem; color: rgba(255,255,255,.4);
  border-top: 1px solid rgba(255,255,255,.07);
}
.footer-bottom a { color: rgba(255,255,255,.5); }
.footer-bottom a:hover { color: var(--accent); }

/* ── Lightbox ── */
.lightbox {
  position: fixed; inset: 0; background: rgba(0,0,0,.9);
  z-index: 1000; display: none;
  align-items: center; justify-content: center;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; border-radius: 4px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  color: #fff; font-size: 2rem; cursor: pointer; background: none; border: none; line-height: 1;
}

/* ── Alerts / flash ── */
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: .92rem;
}
.alert-success { background: #DCFCE7; color: #166534; border: 1px solid #86EFAC; }
.alert-error, .alert-danger { background: #FEE2E2; color: #991B1B; border: 1px solid #FCA5A5; }
.alert-info  { background: #DBEAFE; color: #1E40AF; border: 1px solid #93C5FD; }
.alert-warn  { background: #FEF3C7; color: #92400E; border: 1px solid #FCD34D; }

/* ── Pagination ── */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 40px; }
.page-link {
  padding: 8px 14px; border-radius: 8px; border: 1.5px solid var(--border);
  font-size: .88rem; font-weight: 500; color: var(--text); text-decoration: none;
  transition: all .15s;
}
.page-link:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.page-link.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ── Empty state ── */
.empty-state { text-align: center; padding: 60px 24px; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 12px; }
.empty-state h3 { font-size: 1.2rem; margin: 0 0 8px; color: var(--text); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .site-nav-inner { display: none; flex-direction: column; padding: 8px 0 16px; }
  .site-nav-inner.open { display: flex; }
  .site-nav-inner a, .nav-parent-btn { width: 100%; }
  .nav-dropdown { position: static; box-shadow: none; border: none; background: rgba(255,255,255,.05); }
  .artwork-detail-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { padding: 50px 20px 60px; }
}
@media (max-width: 480px) {
  .artwork-grid { grid-template-columns: 1fr; }
}
