* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-off-white: #fafaf9;
    --color-charcoal: #2c2c2c;
    --color-beige: #d4c4b0;
    --color-light-beige: #e8ddd0;
    --color-text: #1a1a1a;
    --color-text-light: #666;
    --color-border: #e5e5e5;
    --shadow-soft: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-off-white);
    overflow-x: hidden;
    width: 100%;
}

html {
    overflow-x: hidden;
}

/* Header */
header {
    background-color: #fff;
    border-bottom: 1px solid var(--color-border);
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-soft);
    width: 100%;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
    text-decoration: none;
    letter-spacing: -0.5px;
    display: flex !important;
    align-items: center;
    transition: var(--transition);
    flex-shrink: 0;
    overflow: visible;
    visibility: visible !important;
    opacity: 1 !important;
}

.logo:hover {
    opacity: 0.8;
}

.logo img {
    height: 45px;
    width: auto;
    min-width: 180px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    object-fit: contain;
    flex-shrink: 0;
}

/* Tablet breakpoint */
@media (max-width: 1024px) {
    .logo img {
        height: 42px;
        width: auto;
    }

    /* Prevent horizontal scroll */
    body, html {
        max-width: 100vw;
        overflow-x: hidden;
    }

    *:not(.logo):not(.logo *):not(img) {
        max-width: 100%;
    }
    
    .logo, .logo * {
        max-width: none !important;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 32px;
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

nav a:hover {
    color: var(--color-beige);
}

nav a.active {
    color: var(--color-beige);
}

.cart-link {
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -12px;
    background-color: var(--color-beige);
    color: #fff;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Footer */
footer {
    background-color: #fff;
    border-top: 1px solid var(--color-border);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--color-charcoal);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--color-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: var(--color-beige);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--color-off-white) 0%, var(--color-light-beige) 100%);
    padding: 5rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--color-charcoal);
    letter-spacing: -1px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.9rem 2rem;
    background-color: var(--color-charcoal);
    color: #fff;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-family: inherit;
}

.btn:hover {
    background-color: var(--color-beige);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid var(--color-charcoal);
    color: var(--color-charcoal);
}

.btn-secondary:hover {
    background-color: var(--color-charcoal);
    color: #fff;
}

/* Sections */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 3rem;
    text-align: center;
    color: var(--color-charcoal);
    letter-spacing: -0.5px;
}

/* Product Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.product-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background-color: var(--color-light-beige);
    display: block !important;
    min-height: 280px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.product-image.loaded {
    opacity: 1;
}

.product-image[style*="background"] {
    opacity: 1 !important;
}

.product-info {
    padding: 1.5rem;
}

.product-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-charcoal);
}

.product-description {
    color: var(--color-text-light);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.product-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--color-charcoal);
    margin-bottom: 1rem;
}

/* Categories */
.categories {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    justify-content: center;
}

.category-btn {
    padding: 0.7rem 1.5rem;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
}

.category-btn:hover,
.category-btn.active {
    background-color: var(--color-charcoal);
    color: #fff;
    border-color: var(--color-charcoal);
}

/* Content Sections */
.content-section {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.content-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--color-charcoal);
}

.content-section p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--color-text);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--color-charcoal);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-beige);
    box-shadow: 0 0 0 3px rgba(212, 196, 176, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Cart */
.cart-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #fff;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-soft);
    align-items: center;
}

.cart-item-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    background-color: var(--color-light-beige);
}

.cart-item-details {
    flex: 1;
}

.cart-item-name {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.cart-item-price {
    color: var(--color-text-light);
    margin-bottom: 1rem;
}

.quantity-control {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.quantity-btn {
    width: 32px;
    height: 32px;
    border: 1px solid var(--color-border);
    background: #fff;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.quantity-btn:hover {
    background-color: var(--color-beige);
    border-color: var(--color-beige);
    color: #fff;
}

.cart-item-total {
    font-size: 1.2rem;
    font-weight: 600;
    margin-left: auto;
}

.remove-btn {
    background: none;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    padding: 0.5rem;
}

.cart-summary {
    background: #fff;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    margin-top: 2rem;
}

.cart-total {
    display: flex;
    justify-content: space-between;
    font-size: 1.5rem;
    font-weight: 600;
    padding-top: 1rem;
    border-top: 2px solid var(--color-border);
    margin-top: 1rem;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 1.5rem 2rem;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.cookie-banner.active {
    display: block;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
    font-size: 0.9rem;
    color: var(--color-text);
}

.cookie-text a {
    color: var(--color-beige);
    text-decoration: underline;
}

/* Product Detail */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.product-detail-image {
    width: 100%;
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
    background-color: var(--color-light-beige);
}

.product-detail-info h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-charcoal);
}

.product-detail-price {
    font-size: 2rem;
    font-weight: 600;
    margin: 1.5rem 0;
    color: var(--color-charcoal);
}

.product-detail-description {
    line-height: 1.8;
    margin-bottom: 2rem;
    color: var(--color-text);
}

.care-instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--color-light-beige);
    border-radius: 8px;
}

.care-instructions h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.care-instructions ul {
    list-style-position: inside;
    line-height: 1.8;
}

/* Responsive - Tablets (768px - 1024px) */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }

    .header-container {
        padding: 0 1.5rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .product-detail {
        gap: 2rem;
    }
}

/* Responsive - Mobile & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    .header-container {
        flex-direction: row;
        justify-content: space-between;
        padding: 1rem 1.5rem;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    .logo img {
        height: 40px;
        width: auto;
        min-width: 160px;
    }

    nav {
        width: auto;
        max-width: 100%;
        flex: 1;
        min-width: 0;
        overflow: visible;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: flex-end;
        gap: 1rem;
        font-size: 0.9rem;
    }

    nav a {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }

    .cart-count {
        font-size: 0.7rem;
        width: 18px;
        height: 18px;
    }

    .container {
        padding: 0 1.5rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero h1 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }

    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

    .product-card {
        border-radius: 10px;
    }

    .product-image {
        height: 240px;
        min-height: 240px;
        display: block !important;
        width: 100% !important;
        object-fit: cover;
        background-size: cover;
        background-position: center;
        opacity: 1 !important;
    }
    
    .product-image:not(.loaded):not([style*="background"]) {
        opacity: 0.5;
    }

    .product-info {
        padding: 1.2rem;
    }

    .product-name {
        font-size: 1.1rem;
    }

    .product-description {
        font-size: 0.9rem;
    }

    .product-price {
        font-size: 1.3rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }

    .product-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-detail-image {
        height: 350px;
    }

    .product-detail-info h1 {
        font-size: 2rem;
    }

    .product-detail-price {
        font-size: 1.8rem;
    }

    .cart-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.2rem;
    }

    .cart-item-image {
        width: 100%;
        height: 200px;
        align-self: center;
    }

    .cart-item-details {
        width: 100%;
    }

    .cart-item-total {
        margin-left: 0;
        margin-top: 1rem;
        font-size: 1.3rem;
    }

    .cart-summary {
        padding: 1.5rem;
    }

    .categories {
        gap: 0.75rem;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

    .categories::-webkit-scrollbar {
        height: 4px;
    }

    .category-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    .content-section {
        padding: 1rem 0;
    }

    .content-section h2 {
        font-size: 1.6rem;
        margin-bottom: 1.2rem;
    }

    .footer-container {
        padding: 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 2rem;
    }

    .cookie-banner {
        padding: 1.2rem 1.5rem;
    }

    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .cookie-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .cookie-banner .btn {
        width: 100%;
        max-width: 200px;
        margin: 0 auto;
    }

    /* Contact page specific */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    iframe {
        height: 300px;
    }

    /* Contact page grid improvements */
    .section > .container > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
    }
}

/* Responsive - Small Mobile (max-width: 480px) */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .header-container {
        padding: 0.8rem 1rem;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .logo {
        flex-shrink: 0;
    }

    .logo img {
        height: 36px;
        width: auto;
        min-width: 140px;
    }

    nav {
        flex: 1;
        min-width: 0;
        overflow: visible;
    }

    /* Ensure logo is fully visible */
    header {
        overflow: visible;
    }

    .header-container {
        overflow: visible;
    }

    nav ul {
        gap: 0.75rem;
        font-size: 0.85rem;
    }

    nav a {
        font-size: 0.85rem;
    }

    .container {
        padding: 0 1rem;
    }

    nav ul {
        justify-content: flex-end;
        gap: 0.5rem;
    }

    nav a {
        padding: 0.4rem 0.3rem;
        font-size: 0.8rem;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero h1 {
        font-size: 1.75rem;
        margin-bottom: 0.8rem;
    }

    .hero p {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .section {
        padding: 2.5rem 0;
    }

    .section-title {
        font-size: 1.6rem;
        margin-bottom: 1.5rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .product-image {
        height: 280px;
        min-height: 280px;
        display: block !important;
        width: 100% !important;
        object-fit: cover;
        background-size: cover;
        background-position: center;
        opacity: 1 !important;
    }
    
    .product-image:not(.loaded):not([style*="background"]) {
        opacity: 0.5;
    }

    .product-info {
        padding: 1rem;
    }

    .product-name {
        font-size: 1.05rem;
    }

    .product-description {
        font-size: 0.9rem;
        margin-bottom: 0.8rem;
    }

    .product-price {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        width: 100%;
        text-align: center;
    }

    .product-detail-info h1 {
        font-size: 1.75rem;
    }

    .product-detail-price {
        font-size: 1.6rem;
    }

    .product-detail-description {
        font-size: 0.95rem;
    }

    .cart-item {
        padding: 1rem;
    }

    .cart-item-image {
        height: 180px;
    }

    .quantity-control {
        width: 100%;
        justify-content: space-between;
        padding: 0.5rem 0;
    }

    .cart-summary {
        padding: 1.2rem;
    }

    .cart-total {
        font-size: 1.3rem;
    }

    .categories {
        gap: 0.5rem;
    }

    .category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .content-section {
        padding: 0.5rem 0;
    }

    .content-section h2 {
        font-size: 1.4rem;
    }

    .content-section p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section ul {
        display: inline-block;
        text-align: left;
    }

    .cookie-banner {
        padding: 1rem;
    }

    .cookie-text {
        font-size: 0.8rem;
        margin-bottom: 0.5rem;
    }

    iframe {
        height: 250px;
    }

    .care-instructions {
        padding: 1.2rem;
        font-size: 0.9rem;
    }

    /* Contact page mobile */
    .section > .container > div[style*="grid-template-columns"] {
        margin-top: 2rem !important;
    }

    .section > .container > div[style*="margin-top: 4rem"] {
        margin-top: 2.5rem !important;
    }
}

/* Responsive - Landscape Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .hero {
        padding: 2rem 0;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .section {
        padding: 2.5rem 0;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
        touch-action: manipulation;
    }

    nav a {
        padding: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        touch-action: manipulation;
    }

    .category-btn {
        min-height: 44px;
        touch-action: manipulation;
    }

    .quantity-btn {
        min-width: 44px;
        min-height: 44px;
        touch-action: manipulation;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        min-height: 44px;
    }

    /* Improve tap targets on mobile */
    .remove-btn {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Smooth scrolling */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Improve text rendering on mobile */
@media (max-width: 768px) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        text-rendering: optimizeLegibility;
    }

    /* Improve image loading on mobile */
    img:not(.logo img):not(.product-image) {
        max-width: 100%;
        height: auto;
        display: block;
    }
    
    .product-image {
        max-width: 100% !important;
        width: 100% !important;
        display: block !important;
    }
    
    .logo img {
        max-width: none !important;
    }

    /* Better table handling on mobile (for policy pages) */
    table {
        width: 100%;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    /* Improve list spacing */
    ul, ol {
        padding-left: 1.5rem;
    }
}

/* Prevent text size adjustment on iOS */
@media (max-width: 480px) {
    input, textarea, select {
        font-size: 16px !important;
    }
}

/* Safe area insets for iOS devices */
@supports (padding: max(0px)) {
    @media (max-width: 768px) {
        .cookie-banner {
            padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
        }
    }
}

