/* Critical CSS for above-the-fold content */
:root {
    --chakra-colors-brand-primary: #006340;
    --chakra-colors-background-primary: #FFFFFF;
    --chakra-colors-success: #1D8751;
    --chakra-colors-text-primary: #242424;
}

body {
    margin: 0;
    padding: 0;
    font-family: "SuisseIntl-Regular", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    background-color: var(--chakra-colors-background-primary);
}

.app-layout {
    min-height: 100vh;
    overflow-x: clip;
    width: 100%;
}

/* Skip link for accessibility */
.skip-to-content {
    position: absolute;
    transform: translateX(-200%);
    transition: transform 0.3s;
    background: #0F0F0F;
    color: #FFFFFF !important;
    font-weight: bold;
    padding: 0.5rem;
    z-index: 1600;
    top: 0.75rem;
}

.skip-to-content:focus {
    transform: translateX(0%);
    left: 0.75rem;
    outline: 2px solid;
}

/* Header specific styles */
#site-header {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: #fff;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1);
}

.main-header {
    display: flex;
    align-items: center;
    height: 64px;
    padding: 0 16px;
    max-width: 1440px;
    margin: 0 auto;
}

.logo-container {
    margin-right: 16px;
}

.search-container {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.search-input {
    width: 100%;
    height: 40px;
    padding: 0 40px 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background-color: #f7f7f7;
    font-size: 16px;
}

.search-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
}

.main-nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
}

.main-nav a {
    color: #212121;
    text-decoration: none;
    font-weight: 500;
}

.main-nav a:hover {
    color: var(--chakra-colors-brand-primary);
}

.main-nav .icon-link {
    display: flex;
    align-items: center;
    justify-content: center;
}

.category-nav {
    background-color: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}

.category-list {
    display: flex;
    align-items: center;
    height: 48px;
    margin: 0;
    padding: 0;
    list-style: none;
    max-width: 1440px;
    margin: 0 auto;
    overflow-x: auto;
    scrollbar-width: none; /* Firefox */
}

.category-list::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.category-list li {
    flex-shrink: 0;
}

.category-list a {
    display: flex;
    align-items: center;
    height: 100%;
    padding: 0 16px;
    color: #212121;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    white-space: nowrap;
}

.category-list a:hover {
    color: var(--chakra-colors-brand-primary);
}

/* Order status styles */
.chakra-stack {
    display: flex;
}

.css-15nb0gn {
    flex-direction: column;
    gap: 1rem;
}

.chakra-heading.css-qpoarq {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.chakra-text.css-1yszcwj {
    font-size: 0.9375rem;
    color: #242424;
    margin-bottom: 1rem;
}

.css-1lw6xos {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 768px) {
    .css-1lw6xos {
        flex-direction: row;
    }
}

/* Updated button styles to match the reference */
.order-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.625rem 1.25rem;
    border-radius: 1.5rem;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    min-width: 120px;
    height: 40px;
    white-space: nowrap;
}

.primary-button {
    border: 1px solid #242424;
    background-color: transparent;
    color: #242424;
}

.primary-button:hover {
    background-color: rgba(36, 36, 36, 0.05);
}

.secondary-button {
    border: none;
    background-color: #242424;
    color: #FFFFFF;
}

.secondary-button:hover {
    background-color: #000000;
}

.chakra-image.css-uais4z {
    max-width: 100%;
    height: auto;
    border-radius: 0.375rem;
    object-fit: contain;
}

/* Order Status Component Styling */
.css-1gdm410 {
    padding: 24px;
    border: 1px solid rgb(226, 232, 240);
    border-radius: 8px;
    margin-bottom: 24px;
}

.chakra-text.css-qgmhv {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 24px;
    color: #242424;
}

.order-status-container {
    position: relative;
}

.order-status-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.order-status-item {
    display: flex;
    margin-bottom: 24px;
    position: relative;
}

.status-icon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 16px;
}

.check-circle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.stockx-icon {
    width: 32px;
    height: 32px;
}

.status-line-container {
    position: absolute;
    top: 32px;
    left: 16px;
    bottom: -16px;
    width: 2px;
    z-index: 1;
}

.status-line {
    width: 2px;
    background-color: #1D8751;
    height: 100%;
}

.order-status-item:last-child .status-line-container {
    display: none;
}

.status-content {
    flex: 1;
    padding-top: 4px;
}

.status-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px;
    color: #242424;
}

.status-description {
    font-size: 14px;
    color: #5F5F5F;
    margin: 0;
}

.chakra-text.css-m6nckk {
    background: none;
    border: none;
    color: #006340;
    font-weight: 600;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
    margin-top: 8px;
}

.chakra-text.css-m6nckk:hover {
    text-decoration: underline;
}

/* Status visibility toggle */
.order-status-container.collapsed {
    max-height: 80px;
    overflow: hidden;
}

/* General layout styles */
.css-12ggjak {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    margin-top: 2rem;
}

.css-cfl7xe {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.css-8atqhb {
    border: 1px solid #EDEDED;
    border-radius: 0.5rem;
    overflow: hidden;
}

.css-uoqsga {
    display: block;
    padding: 1rem;
    color: #242424;
    text-decoration: none;
    position: relative;
}

.css-uoqsga:hover {
    background-color: #F9F9F9;
}

.css-1imsroz {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0;
}

.css-1fl0ake {
    margin-top: 0.75rem;
    border-color: #EDEDED;
    opacity: 0.8;
}

.css-idkz9h {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.css-vba9o1 {
    margin-top: 1.5rem;
    font-size: 0.9375rem;
    color: #5F5F5F;
}

.css-nuikzp {
    color: #006340;
    text-decoration: none;
    font-weight: 500;
}

.css-nuikzp:hover {
    text-decoration: underline;
}

/* Order content layout */
.order-content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 992px) {
    .order-content-wrapper {
        flex-direction: row;
        align-items: flex-start;
    }

    .order-main-content {
        flex: 1;
        padding-right: 2rem;
    }

    .price-container {
        width: 350px;
        flex-shrink: 0;
        position: sticky;
        top: 100px;
    }
}

/* Fix order title spacing */
.order-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.delivery-date {
    font-size: 1.25rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    color: #242424;
}

.product-link {
    font-size: 1.125rem;
    color: #006340;
    text-decoration: none;
    margin-bottom: 0.25rem;
    display: block;
}

.order-number {
    font-size: 0.875rem;
    color: #5F5F5F;
    margin-bottom: 1.5rem;
}

.order-details-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

.css-1bqb9u7 {
    background-color: #FFFFFF;
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    border: 1px solid #EDEDED;
}

.css-z5vv1d {
    margin-bottom: 1.5rem;
}

.css-s9jvxl {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.css-1osnfz5 {
    background-color: transparent;
    color: #006340;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border: 1px solid #006340;
    border-radius: 0.375rem;
    text-decoration: none;
}

.css-gg4vpm {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0;
}

.css-1194yhr {
    font-size: 0.9375rem;
    color: #5F5F5F;
    font-weight: 400;
}

.css-6tf6w0 {
    font-size: 0.9375rem;
    color: #242424;
    font-weight: 500;
    text-align: right;
}

.css-6vp6sv {
    font-size: 1rem;
    color: #242424;
    font-weight: 700;
    text-align: right;
}

.css-q4kn4j {
    margin: 0.75rem 0;
    border-color: #EDEDED;
    opacity: 0.8;
}

.css-1q7s732 {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #EDEDED;
}

.css-70qvj9 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.css-13doplr {
    font-size: 0.875rem;
    color: #5F5F5F;
    font-weight: 400;
}

.css-pgx4ap {
    font-size: 0.875rem;
    color: #242424;
    font-weight: 500;
}

/* Return policy section */
.css-1bulwpl {
    margin-top: 1.5rem;
}

.css-mwgmyd {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.css-1p585rs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.css-1ubwpkl {
    font-size: 1rem;
    font-weight: 600;
    color: #242424;
}

.css-1w81hq6 {
    display: flex;
    align-items: center;
    color: #5F5F5F;
    font-size: 0.875rem;
}

.css-12w8fd6 {
    font-size: 0.875rem;
    color: #5F5F5F;
    line-height: 1.5;
}

.css-b6eo68 {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background-color: #F9F9F9;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.css-1ask9rr {
    flex-direction: column;
    flex: 1;
}

.css-16uh76k {
    font-size: 0.9375rem;
    color: #242424;
    line-height: 1.5;
}

.css-pagca7 {
    font-weight: 700;
    color: #242424;
}

.css-2bkegz {
    color: #5F5F5F;
    font-weight: 400;
}

.css-1kg3dwq {
    color: #006340;
    font-weight: 500;
    margin-left: 0.5rem;
    text-decoration: none;
}

.css-k008qs {
    display: flex;
    align-items: flex-start;
    padding: 1rem;
    background-color: #F9F9F9;
    border-radius: 0.5rem;
}

.css-vii4nh {
    font-size: 1rem;
    font-weight: 600;
    color: #242424;
    margin-bottom: 0.5rem;
}

.css-1l31v6r {
    font-size: 0.875rem;
    color: #5F5F5F;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.css-4si6hn {
    margin-top: 1rem;
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.css-19hr03h {
    font-size: 0.875rem;
    font-weight: 500;
    color: #5F5F5F;
}

.css-zd300o {
    margin-top: 1rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: #006340;
    cursor: pointer;
    text-decoration: none;
}

/* Process and Buyer Promise section */
.css-l36zks {
    margin-top: 1.5rem;
}

.css-1o81fxu {
    background-color: #F9F9F9;
    border-radius: 0.5rem;
    padding: 1rem;
}

.css-vzffu {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
}

.css-1cs3nqr {
    width: 24px;
    height: 24px;
    color: #006340;
}

.css-38e9h {
    font-size: 0.875rem;
    font-weight: 500;
    color: #242424;
}

.css-dbsrud {
    height: 24px;
}

.css-z0u4bg {
    height: 100%;
    border-color: #CFCFCF;
}

/* Share section */
.css-1soz29a {
    margin-top: 1.5rem;
}

.css-y33qzj {
    margin-top: 1rem;
}

.css-wkhz9b {
    font-size: 1rem;
    font-weight: 600;
    color: #242424;
    margin-bottom: 1rem;
}

.css-1002afg {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.css-1y5hin0 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #F5F5F5;
    border-radius: 0.375rem;
    color: #242424;
    font-size: 0.875rem;
    text-decoration: none;
}

.css-jcft88 {
    font-size: 0.875rem;
    font-weight: 500;
}

/* Back to top button */
.back-to-top {
    background-color: #fff;
    border-radius: 50%;
    border: 1px solid #e0e0e0;
    bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    color: #242424;
    cursor: pointer;
    display: none;
    height: 3rem;
    padding: 0;
    position: fixed;
    right: 2rem;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    width: 3rem;
    z-index: 100;
}

.back-to-top.visible {
    display: block;
}

.back-to-top:hover {
    background-color: #f5f5f5;
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
    .css-1sb8wtk {
        flex-direction: column;
    }

    .css-uais4z {
        max-width: 100%;
        margin-top: 1.5rem;
    }

    .order-details-container {
        padding: 1rem;
    }
}

/* Additional layout utilities */
.css-1ih9n5n {
    margin-bottom: 1.5rem;
}

.css-1sb8wtk {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
}

/* Ensure proper alignment between order details and product image */
@media (min-width: 768px) {
    .css-1sb8wtk {
        display: flex;
        flex-direction: row;
    }

    .css-1sb8wtk .chakra-image.css-uais4z {
        width: auto;
        max-height: 201px;
    }
}

/* StockX Generator Specific Styles */
.generator-container {
  max-width: 900px;
  margin: 0 auto 3rem;
  padding: 1.5rem;
  background-color: var(--color-background-primary);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.generator-title {
  font-family: var(--font-family-bold);
  font-size: var(--font-size-3xl);
  margin-bottom: var(--space-2);
  color: var(--color-brand-primary);
}

.generator-description {
  margin-bottom: var(--space-6);
  color: var(--color-text-secondary);
}

.generator-form-container {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stockx-url-container {
  margin-bottom: var(--space-4);
}

.input-group {
  display: flex;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.input-group .form-control {
  flex: 1;
}

.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-8);
  gap: var(--space-4);
  background-color: var(--color-background-secondary);
  border-radius: var(--radius-md);
}

.product-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-8);
}

.form-section {
  padding: var(--space-6);
  background-color: var(--color-background-secondary);
  border-radius: var(--radius-md);
}

.section-heading {
  font-family: var(--font-family-medium);
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-border-primary);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .form-row {
    grid-template-columns: 1fr 1fr;
  }
}

.form-preview {
  margin-top: var(--space-4);
  display: flex;
  justify-content: center;
  background-color: var(--color-background-primary);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-primary);
}

.form-preview img {
  max-width: 300px;
  max-height: 214px;
  object-fit: contain;
}

.calculated-total {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: var(--space-4);
  padding: var(--space-4);
  background-color: var(--color-background-primary);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-primary);
}

.total-label {
  font-family: var(--font-family-medium);
  font-size: var(--font-size-lg);
  margin-right: var(--space-4);
}

.total-amount {
  font-family: var(--font-family-bold);
  font-size: var(--font-size-2xl);
  color: var(--color-brand-primary);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

/* Receipt Preview Styles */
.receipt-preview-container {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-4);
  overflow-y: auto;
}

.receipt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 900px;
  padding: var(--space-4);
  background-color: var(--color-brand-primary);
  color: var(--color-text-inverse);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}

.receipt-header h2 {
  margin: 0;
  color: var(--color-text-inverse);
}

.receipt-header .btn-link {
  color: var(--color-text-inverse);
}

.receipt-content {
  width: 100%;
  max-width: 900px;
  background-color: var(--color-background-primary);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

/* Print-specific styling */
@media print {
  .generator-container,
  .receipt-header,
  #site-header,
  .back-to-top,
  .category-nav {
    display: none !important;
  }

  .receipt-preview-container {
    position: static;
    background: none;
    padding: 0;
    overflow: visible;
  }

  .receipt-content {
    box-shadow: none;
    max-width: 100%;
    width: 100%;
  }
}