/* Main CSS - Core Styles for Ink & Aura */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #4a3f35;
    background-color: #faf8f3;
    overflow-x: hidden;
    padding-top: 160px; /* Account for fixed header - increased gap */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
    line-height: 1.3;
    color: #8b7355;
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
}

/* Override h2 styling for WooCommerce product titles */
body:not(.ia-shop-skin) .woocommerce ul.products li.product h2,
body:not(.ia-shop-skin) .woocommerce ul.products li.product .woocommerce-loop-product__title {
    font-size: 0.75rem !important;
    margin-bottom: 0 !important;
}

h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* Override h3 for product titles specifically */
body:not(.ia-shop-skin) .product-title,
body:not(.ia-shop-skin) h3.product-title,
body:not(.ia-shop-skin) .woocommerce .product-title {
    font-size: 0.75rem !important;
    font-weight: 300 !important;
    margin-bottom: 0 !important;
}

h4 {
    font-size: 1.5rem;
    margin-bottom: 0.875rem;
}

h5 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

h6 {
    font-size: 1.125rem;
    margin-bottom: 0.625rem;
}

p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
}

a {
    color: #b8956a;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #8b7355;
}

/* Container and Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Main Content Area */
.main-content {
    min-height: calc(100vh - 100px);
    padding-top: 0;
}

.section {
    padding: 3rem 0;
}

.section-large {
    padding: 4rem 0;
}

.section-small {
    padding: 1.5rem 0;
}

/* Further reduce spacing for homepage sections */
.hero-section + section,
section + section {
    padding-top: 2rem;
}

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, #b8956a 0%, #a0845c 100%);
    color: white;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #a0845c 0%, #8b7355 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.3);
    color: white;
}

.btn-secondary {
    background: transparent;
    color: #8b7355;
    border: 2px solid #8b7355;
}

.btn-secondary:hover {
    background: #8b7355;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.2);
}

.btn-outline {
    background: transparent;
    color: #b8956a;
    border: 1px solid #b8956a;
}

.btn-outline:hover {
    background: #b8956a;
    color: white;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(139, 115, 85, 0.1);
    border: 1px solid rgba(139, 115, 85, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(139, 115, 85, 0.15);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #8b7355;
}

.card-text {
    color: #6b5b47;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #8b7355;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e8e3d8;
    border-radius: 8px;
    background: #faf8f3;
    color: #4a3f35;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: #b8956a;
    background: white;
    box-shadow: 0 0 0 3px rgba(184, 149, 106, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

.img-rounded {
    border-radius: 8px;
}

.img-circle {
    border-radius: 50%;
}

/* Spacing Utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.pt-1 { padding-top: 0.5rem; }
.pt-2 { padding-top: 1rem; }
.pt-3 { padding-top: 1.5rem; }
.pt-4 { padding-top: 2rem; }
.pt-5 { padding-top: 3rem; }

.pb-1 { padding-bottom: 0.5rem; }
.pb-2 { padding-bottom: 1rem; }
.pb-3 { padding-bottom: 1.5rem; }
.pb-4 { padding-bottom: 2rem; }
.pb-5 { padding-bottom: 3rem; }

/* Text Utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.text-primary { color: #8b7355; }
.text-secondary { color: #6b5b47; }
.text-muted { color: #a0845c; }
.text-white { color: white; }

.font-serif { font-family: 'Playfair Display', serif; }
.font-sans { font-family: 'Inter', sans-serif; }

.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Background Utilities */
.bg-primary { background-color: #8b7355; }
.bg-secondary { background-color: #b8956a; }
.bg-light { background-color: #faf8f3; }
.bg-white { background-color: white; }

.bg-gradient {
    background: linear-gradient(135deg, #b8956a 0%, #a0845c 100%);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in {
    animation: slideIn 0.5s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
    cursor: not-allowed;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e8e3d8;
    border-top: 2px solid #b8956a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.25rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-large {
        padding: 4rem 0;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    .card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .section-large {
        padding: 3rem 0;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.875rem;
    }
    
    .card {
        padding: 1.25rem;
    }
}

/* Print Styles */
@media print {
    * {
        background: transparent !important; /* Keep - print override needed */
        color: black !important; /* Keep - print override needed */
        box-shadow: none !important; /* Keep - print override needed */
        text-shadow: none !important; /* Keep - print override needed */
    }
    
    a, a:visited {
        text-decoration: underline;
    }
    
    .btn {
        border: 1px solid black;
        background: transparent;
        color: black;
    }
    
    .header,
    .footer {
        display: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #8b7355;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Focus styles for better accessibility */
*:focus {
    outline: 2px solid #b8956a;
    outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 2px solid #b8956a;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000;
        border: 2px solid #000;
    }
    
    .btn-secondary {
        background: #fff;
        color: #000;
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important; /* Keep - accessibility override needed */
        animation-iteration-count: 1 !important; /* Keep - accessibility override needed */
        transition-duration: 0.01ms !important; /* Keep - accessibility override needed */
        scroll-behavior: auto !important; /* Keep - accessibility override needed */
    }
}

/* Product Grid Styles */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-grid-three {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.vault-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

@media (max-width: 1024px) {
    .product-grid-three {
        grid-template-columns: repeat(2, 1fr);
    }
    .vault-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-grid-three,
    .vault-grid {
        grid-template-columns: 1fr;
    }
}

/* Limited Edition Styling */
.product-card.limited-edition {
    position: relative;
    border: 2px solid var(--color-gold);
    background: linear-gradient(135deg, var(--color-cream) 0%, #faf8f5 100%);
}

.limited-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--color-gold);
    color: var(--color-charcoal);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.edition-info {
    display: block;
    font-size: 0.875rem;
    color: var(--color-gold);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Section CTA Styling */
.section-cta {
    text-align: center;
    margin-top: 3rem;
}