:root {
    --primary: #d4a373;
    --primary-dark: #b98454;
    --bg-clay: #fefae0;
    --text-main: #333d29;
    --white: #ffffff;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: #fafafa;
    color: var(--text-main);
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

.app-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.app-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo-icon {
    font-size: 2rem;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.5px;
}

.brand-tag {
    font-size: 0.7rem;
    color: var(--primary-dark);
    font-weight: bold;
}

.desktop-nav {
    display: flex;
    gap: 15px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-main);
    padding: 6px 10px;
}

.nav-item {
    background: none;
    border: none;
    padding: 10px 18px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 20px;
    transition: 0.2s;
    color: #555;
}

.nav-item.active {
    background: var(--bg-clay);
    color: var(--text-main);
}

.btn-nav-secondary {
    background: var(--primary);
    color: var(--white);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
}

.global-control-deck {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.search-clay-container {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 30px;
    display: flex;
    align-items: center;
    padding: 10px 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
}

.search-clay-container input {
    border: none;
    outline: none;
    width: 100%;
    margin: 0 10px;
    font-size: 1rem;
}

.btn-clear-search-inline {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
}

.quick-filter-bar {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-pill {
    background: var(--white);
    border: 1px solid #e0e0e0;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 500;
    transition: 0.2s;
}

.filter-pill.active {
    background: var(--text-main);
    color: var(--white);
    border-color: var(--text-main);
}

.eggless-pill {
    background: #e8f5e9;
    color: #2e7d32;
    border-color: #c8e6c9;
}

.eggless-pill.active-toggle {
    background: #2e7d32;
    color: var(--white);
}

.pipeline-status-bar {
    background: #e3f2fd;
    color: #0d47a1;
    padding: 10px 20px;
    border-radius: 8px;
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-reset-link {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    font-weight: 600;
}

.catalog-workspace {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.menu-action-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.clay-select-ui {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    outline: none;
    font-weight: 600;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

.clay-product-card {
    background: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.04);
    border: 1px solid #f0f0f0;
    transition: transform 0.2s;
}

.clay-product-card:hover {
    transform: translateY(-4px);
}

.card-visual-frame {
    height: 220px;
    background: #eee;
    position: relative;
    cursor: pointer;
}

.card-visual-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.live-ar-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
}

.card-body-content {
    padding: 20px;
}

.card-title-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 15px;
}

.card-title-line h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
}

.card-category-tag {
    background: #f5f5f5;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #666;
}

.card-footer-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f9f9f9;
    padding-top: 15px;
}

.price-stack label {
    display: block;
    font-size: 0.75rem;
    color: #888;
}

.price-val {
    display: inline-block;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--white);
    background: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(185, 132, 84, 0.4);
}

.dual-cta-group {
    display: flex;
    gap: 8px;
}

.btn-clay-configure {
    background: var(--text-main);
    color: var(--white);
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.btn-cta-secondary-ar {
    background: #f0f0f0;
    border: none;
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

/* Extra Home Specific Panels */
.delivery-summary-box {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.summary-item {
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid #eef0ec;
    display: flex;
    gap: 15px;
    align-items: center;
}

.summary-icon {
    font-size: 2rem;
}

.summary-item h4 {
    margin: 0 0 5px 0;
}

.summary-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Contact Panel */
.contact-dual-panel {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.glow-action-link {
    display: inline-block;
    margin-top: 10px;
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: bold;
}

/* Modal Backdrop Base */
.modal-root-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.clay-glass-modal-frame {
    background: white;
    padding: 30px;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    position: relative;
    margin: 20px;
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

.modal-grid-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.modal-image-carrier img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 12px;
}

.modal-meta-row {
    display: flex;
    gap: 15px;
    align-items: center;
    margin: 15px 0;
}

#modal-calculated-price {
    font-size: 1.5rem;
    font-weight: 800;
}

.badge-eggless-true {
    color: #2e7d32;
    font-weight: bold;
}

.badge-eggless-false {
    color: #c62828;
    font-weight: bold;
}

.btn-whatsapp-submit {
    background: #25d366;
    color: white;
    border: none;
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    margin-top: 15px;
}

/* Skeleton States */
.skeleton-card {
    height: 350px;
    background: #eceff1;
    border-radius: 16px;
    animation: shine 1.5s infinite ease-in-out;
}

@keyframes shine {
    0% {
        opacity: 0.6;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.6;
    }
}

.app-footer {
    background: var(--text-main);
    color: var(--white);
    padding: 50px 20px 30px 20px;
    margin-top: 60px;
    border-top: 4px solid var(--primary);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 30px;
}

.footer-brand {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: var(--bg-clay);
    display: block;
    margin-bottom: 15px;
}

.footer-address {
    font-size: 0.95rem;
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 10px auto;
    opacity: 0.9;
}

.footer-contact-text {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: 500;
    margin: 5px 0 0 0;
}

.footer-copyright-block {
    width: 100%;
    border-top: 1px solid rgba(254, 250, 224, 0.15);
    padding-top: 20px;
    font-size: 0.85rem;
    opacity: 0.6;
}

.floating-contact-deck {
    position: fixed;
    bottom: 25px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 999;
}

.fab-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 30px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab-btn:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.fab-whatsapp {
    background: #25D366;
}

.fab-call {
    background: #0076ff;
}

/* Response for small mobile views (just show icons if space is low) */
@media (max-width: 480px) {
    .fab-text {
        display: none;
    }

    .fab-btn {
        padding: 14px;
        border-radius: 50%;
        font-size: 1.2rem;
    }
}

model-viewer {
    width: 100%;
    height: 300px;
    background-color: #f5f5f5;
    border-radius: 12px;
    --poster-color: transparent;
}

#ar-prompt-btn {
    background: var(--text-main);
    color: white;
    border-radius: 8px;
    border: none;
    padding: 10px 16px;
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Footer layout update for QR block */
.footer-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    width: 100%;
    text-align: left;
}

.footer-qr-block h4 {
    margin: 0 0 10px 0;
    color: var(--bg-clay);
    font-size: 1.1rem;
}

.qr-code-wrapper {
    background: white;
    padding: 10px;
    border-radius: 12px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.qr-code-wrapper img {
    display: block;
    width: 130px;
    height: 130px;
}

.qr-subtext {
    font-size: 0.8rem;
    opacity: 0.7;
    margin-top: 8px;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .footer-grid-layout {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-qr-block {
        margin-top: 10px;
    }
}

.header-container {
    flex-wrap: nowrap;
}

.app-logo {
    min-width: 0;
    flex-shrink: 1;
}

.logo-text {
    min-width: 0;
    overflow: hidden;
}

.brand-name {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .header-container {
        padding: 12px 16px;
    }

    .logo-icon {
        font-size: 1.6rem;
    }

    .brand-name {
        font-size: 1rem;
    }

    .brand-tag {
        font-size: 0.6rem;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .desktop-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        padding: 10px;
        box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
        border-top: 1px solid #f0f0f0;
    }

    .desktop-nav.nav-open {
        display: flex;
    }

    .desktop-nav .nav-item {
        width: 100%;
        text-align: left;
        border-radius: 8px;
        padding: 12px 16px;
    }

    .app-header {
        position: sticky;
    }

    .header-container {
        position: relative;
    }
}

@media (max-width: 480px) {
    .card-footer-action-row {
        flex-wrap: nowrap;
        align-items: center;
        gap: 6px;
    }

    .price-stack {
        min-width: 0;
        flex-shrink: 0;
    }

    .dual-cta-group {
        width: auto;
        flex-shrink: 0;
        justify-content: flex-end;
        flex-wrap: nowrap;
        gap: 6px;
    }

    .price-val {
        font-size: 1.05rem;
        padding: 3px 8px;
        white-space: nowrap;
    }

    .btn-clay-configure,
    .btn-cta-secondary-ar {
        padding: 8px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}

.connection-error-card {
    grid-column: 1/-1;
    text-align: center;
    padding: 50px 20px;
    background: var(--white);
    border-radius: 16px;
    max-width: 500px;
    margin: 40px auto;
    border: 1px solid #fde2e2;
}

.connection-error-card .error-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 10px;
}

.connection-error-card h3 {
    margin: 10px 0 6px 0;
    color: var(--text-main);
}

.connection-error-card p {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 18px;
}

.webgl-fallback-card {
    position: fixed;
    inset: 0;
    background: #1a1a1a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 30px;
    z-index: 50;
}

.webgl-fallback-card img {
    width: 100%;
    max-width: 320px;
    border-radius: 12px;
    margin-bottom: 20px;
    object-fit: cover;
}

.webgl-fallback-card h3 {
    color: #fff;
    margin: 0 0 8px 0;
}

.webgl-fallback-card p {
    color: #ccc;
    font-size: 0.9rem;
    max-width: 320px;
}

.install-app-btn {
    background: var(--primary-dark) !important;
    color: var(--white) !important;
    display: none;
}

.install-app-btn:hover {
    opacity: 0.9;
}