/* CSS para a Loja Virtual Premium PETAG */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --primary: #2a5135; /* Verde Oficial do Logotipo Petag */
    --primary-hover: #1e3a26;
    --primary-light: rgba(42, 81, 53, 0.08);
    --accent: #7c3aed; /* Roxo inspirado na Petlove */
    --accent-hover: #6d28d9;
    --accent-light: rgba(124, 58, 237, 0.08);
    --success: #10b981;
    --danger: #ef4444;
    --border-color: #e2e8f0;
    --border-radius: 16px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.05), 0 4px 6px -4px rgba(0,0,0,0.05);
    --font-family: 'Outfit', sans-serif;
}

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

body {
    background-color: var(--bg-light);
    color: var(--text-dark);
    font-family: var(--font-family);
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header */
.store-header {
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.store-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    background: var(--primary-light);
    color: var(--primary);
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
}

.store-name-container {
    display: flex;
    flex-direction: column;
}

.store-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.1;
}

.store-badge {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

/* Search Bar */
.search-wrapper {
    flex: 1;
    max-width: 500px;
    position: relative;
}

.search-input {
    width: 100%;
    background: #f1f5f9;
    border: 1px solid transparent;
    padding: 12px 16px 12px 44px;
    border-radius: 99px;
    font-family: var(--font-family);
    font-size: 14px;
    color: var(--text-dark);
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    background: var(--bg-white);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Actions Menu */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-dark);
    font-family: var(--font-family);
    font-size: 11px;
    font-weight: 500;
    position: relative;
    transition: color 0.2s;
}

.action-btn:hover {
    color: var(--accent);
}

.action-btn svg {
    width: 22px;
    height: 22px;
}

.cart-badge {
    position: absolute;
    top: -4px;
    right: 4px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    font-weight: 700;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-white);
}

.btn-scheduler {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 99px;
    font-weight: 600;
    font-size: 13.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-scheduler:hover {
    background: var(--primary-hover);
}

/* Navigation Category Bar */
.nav-categories {
    border-top: 1px solid var(--border-color);
    background: var(--bg-white);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 24px;
    overflow-x: auto;
    white-space: nowrap;
}

.nav-container::-webkit-scrollbar {
    display: none;
}

.nav-link {
    padding: 14px 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    cursor: pointer;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Main Layout Grid */
.store-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 24px;
}

/* Banners Slider */
.promo-slider {
    background: linear-gradient(135deg, var(--primary), var(--primary-hover));
    border-radius: var(--border-radius);
    padding: 12px 24px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    min-height: 56px;
}

.slider-glow {
    position: absolute;
    width: 160px;
    height: 160px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0) 70%);
    top: -40px;
    right: -40px;
    border-radius: 50%;
}

.slider-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 100%;
    gap: 16px;
    position: relative;
    z-index: 10;
}

.slider-badge {
    display: none;
}

.slider-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.slider-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0;
    color: #fff;
}

.slider-desc {
    font-size: 11px;
    opacity: 0.85;
    margin-bottom: 0;
    color: #fff;
}

.slider-btn {
    background: var(--bg-white);
    color: var(--primary);
    padding: 6px 14px;
    border-radius: 99px;
    font-weight: 700;
    font-size: 12px;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    flex-shrink: 0;
}

.slider-btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Products Section */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.section-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
}

.section-subtitle {
    font-size: 14px;
    color: var(--text-muted);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.product-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    position: relative;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.2);
}

.product-image-container {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
}

.product-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.out-of-stock-tag {
    position: absolute;
    background: var(--danger);
    color: white;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    top: 10px;
    right: 10px;
}

.service-tag {
    position: absolute;
    background: var(--accent);
    color: white;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 700;
    border-radius: 99px;
    top: 10px;
    left: 10px;
}

.product-category {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 6px;
}

.product-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 8px;
    line-height: 1.3;
    height: 40px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.btn-buy {
    background: var(--accent-light);
    color: var(--accent);
    border: none;
    padding: 10px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: auto;
    transition: all 0.2s;
}

.btn-buy:hover {
    background: var(--accent);
    color: white;
}

/* Cart Sidebar (Drawer) */
.cart-drawer {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-white);
    box-shadow: -10px 0 30px rgba(0,0,0,0.05);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
}

.cart-drawer.active {
    right: 0;
}

.cart-header {
    padding: 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cart-title {
    font-size: 18px;
    font-weight: 700;
}

.cart-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.cart-item {
    display: flex;
    gap: 16px;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
}

.cart-item-image {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    background: #f1f5f9;
    padding: 6px;
    object-fit: contain;
}

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

.cart-item-title {
    font-size: 13.5px;
    font-weight: 600;
    color: var(--text-dark);
}

.cart-item-price {
    font-size: 14px;
    font-weight: 700;
    color: var(--accent);
}

.cart-item-qty {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 6px;
}

.qty-btn {
    background: #f1f5f9;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qty-val {
    font-size: 13px;
    font-weight: 600;
}

.cart-footer {
    padding: 24px;
    border-top: 1px solid var(--border-color);
    background: #f8fafc;
}

.cart-total-row {
    display: flex;
    justify-content: space-between;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
}

.btn-checkout {
    background: #25d366; /* WhatsApp Green */
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* Modal Overlay & Scheduler */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1001;
    display: none;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-family);
    font-size: 14px;
    background: var(--bg-white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 81, 53, 0.1);
}

.btn-submit {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--border-radius-sm);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    width: 100%;
}

.btn-submit:hover {
    background: var(--primary-hover);
}

/* Empty Catalog State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

.empty-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.empty-desc {
    color: var(--text-muted);
    font-size: 14px;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .header-top {
        flex-direction: column;
        align-items: stretch;
    }
    .search-wrapper {
        max-width: 100%;
    }
    .header-actions {
        justify-content: space-between;
    }
    .promo-slider {
        padding: 12px 16px;
    }
    .slider-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        max-width: 100%;
    }
    .slider-btn {
        width: 100%;
        justify-content: center;
    }
    .cart-drawer {
        width: 100%;
        right: -100%;
    }
}
