/* assets/css/store.css */

:root {
    --store-primary: #28a745;
    --store-bg: #f8f9fa;
    --store-white: #ffffff;
    --store-text: #333;
    --store-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    --store-glass: rgba(255, 255, 255, 0.2);
    --store-glass-border: rgba(255, 255, 255, 0.3);
}

.store-page {
    background-color: var(--store-bg);
}

/* Vendor Cover Banner Section */
.store-banner-container {
    position: relative;
    background: #fff;
    margin-bottom: 0;
}

.store-cover-area {
    position: relative;
    height: 280px;
    width: 100%;
    overflow: hidden;
    background: #1b4d2a;
}

.store-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Responsive banner: show desktop by default, hide mobile */
.store-banner-mobile {
    display: none;
}

.store-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1), rgba(0,0,0,0.4));
    z-index: 1;
}

.store-profile-bar {
    position: relative;
    background: #fff;
    padding: 0 5% 30px;
    border-bottom: 1px solid #eee;
    z-index: 2;
}

.store-profile-container {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    gap: 30px;
}

.store-logo-box {
    width: 180px;
    height: 180px;
    background: #fff;
    border-radius: 50%;
    border: 6px solid #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    margin-top: -90px;
    flex-shrink: 0;
    overflow: hidden;
}

.store-logo-box img {
    width: 80%;
    height: auto;
}

.store-profile-info {
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding-bottom: 10px;
}

.store-identity {
    color: #333;
}

.store-identity h1 {
    font-size: 2.2rem;
    margin: 0 0 8px;
    font-weight: 800;
    color: #222;
}

.store-loc {
    font-size: 0.9rem;
    color: #666;
    max-width: 600px;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-bottom: 12px;
}

.store-badge-rating {
    display: flex;
    align-items: center;
    gap: 8px;
}

.store-stars-gold {
    color: #ffc107;
    font-size: 1rem;
}

.rating-count {
    font-size: 0.85rem;
    color: #888;
    font-weight: 600;
}

/* Action Buttons */
.store-quick-actions {
    display: flex;
    gap: 12px;
}

.btn-glass {
    padding: 10px 24px;
    border-radius: 8px;
    border: 1.5px solid #28a745;
    color: #28a745;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    background: transparent;
}

.btn-glass i {
    font-size: 1rem;
}

.btn-glass:hover {
    background: #28a745;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

.inquiry-btn {
    border-color: #555;
    color: #555;
}

.inquiry-btn:hover {
    background: #555;
    border-color: #555;
}

/* Main Layout */
.store-layout {
    max-width: 1700px;
    margin: 40px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
}

/* Sidebar & Search Widget */
.widget {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #efefef;
    margin-bottom: 30px;
    overflow: hidden;
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #555;
    letter-spacing: 0.5px;
    margin-bottom: 25px;
    /* Removed border for a cleaner look as per image */
}

.store-cat-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.store-cat-list li {
    margin-bottom: 20px;
}

.store-cat-list li a {
    color: #888;
    text-decoration: none;
    font-size: 1.05rem;
    transition: 0.3s;
    padding-left: 15px;
    display: block;
}

.store-cat-list li a:hover {
    color: var(--store-primary);
    transform: translateX(5px);
}

.search-container {
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
    height: 38px;
    display: flex;
    width: 100%;
}

.search-container input {
    flex: 1;
    min-width: 0;
    border: none;
    padding: 0 12px;
    outline: none;
    font-size: 0.85rem;
}

.search-container button {
    background: var(--store-primary);
    border: none;
    width: 38px;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Product list sorting header */
.store-results-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

/* Navigation Tabs Styling */
.store-nav-tabs {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 0 20px;
}

.store-nav-container {
    max-width: 1700px;
    margin: 0 auto;
    display: flex;
    gap: 15px;
    overflow-x: auto;
}

.tab-btn {
    padding: 15px 25px;
    border: none;
    background: none;
    font-size: 1rem;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--store-primary);
}

.tab-btn.active {
    color: var(--store-primary);
    border-bottom-color: var(--store-primary);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Store page tab content panels */
.store-tab-content {
    display: none;
}

.store-tab-content.active {
    display: block;
}

/* Store About Section */
.store-about-section {
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #efefef;
    line-height: 1.8;
}

.store-about-section h2 {
    font-size: 1.8rem;
    color: #222;
    margin-bottom: 20px;
    font-weight: 800;
}

.store-about-section p {
    color: #555;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.about-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #28a745;
    font-weight: 600;
}

.highlight-item i {
    font-size: 1.2rem;
}

/* Policy Section Styling */
.policy-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.policy-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    padding: 20px;
    background: #fdfdfd;
    border-radius: 10px;
    border: 1px solid #f0f0f0;
    transition: 0.3s ease;
}

.policy-item:hover {
    transform: translateX(10px);
    border-color: #28a745;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.policy-item i {
    font-size: 1.8rem;
    color: #28a745;
    margin-top: 5px;
    width: 40px;
    text-align: center;
}

.policy-content {
    flex: 1;
}

.policy-content h3 {
    font-size: 1.15rem;
    color: #333;
    margin-bottom: 8px;
    font-weight: 700;
}

.policy-content p {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.5;
}

/* Grid Layout */
.store-product-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 40px;
}

.store-product-grid .product-card {
    flex: none;
    width: 100%;
    margin: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #eee;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.store-product-grid .product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    border-color: var(--store-primary);
}

/* Centered Pagination (Full Width) */
.store-pagination {
    max-width: 1700px;
    margin: 40px auto 80px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 12px;
    width: 100%;
    padding: 20px;
    border-top: 1px solid #eee;
}

.store-pagination a {
    width: 40px;
    height: 40px;
    border: 1px solid #ddd;
    background: #fff;
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.store-pagination a:hover {
    border-color: var(--store-primary);
    color: var(--store-primary);
    transform: translateY(-2px);
}

.store-pagination a.active {
    background: var(--store-primary);
    border-color: var(--store-primary);
    color: #fff;
    pointer-events: none;
}

/* Responsiveness */
@media (max-width: 1500px) {
    .store-product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 1250px) {
    .store-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1100px) {
    .store-layout {
        grid-template-columns: 1fr;
    }

    .store-sidebar {
        order: 2;
    }

    .store-product-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .store-product-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .store-profile-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .store-quick-actions {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .store-cover-area {
        height: 200px;
    }

    /* Swap banners on mobile: only when a mobile banner exists */
    .has-mobile-banner .store-banner-mobile {
        display: block;
    }
    .has-mobile-banner .store-banner-desktop {
        display: none;
    }

    .store-profile-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }

    .store-logo-box {
        width: 120px;
        height: 120px;
        margin-top: -60px;
    }

    .store-identity h1 {
        font-size: 1.8rem;
    }

    .store-loc {
        justify-content: center;
    }

    .store-badge-rating {
        justify-content: center;
    }

    .store-quick-actions {
        justify-content: center;
    }
}

@media (max-width: 500px) {
    .store-product-grid {
        grid-template-columns: 1fr;
    }
}
/* Inquiry Modal Styling */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #efefef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #222;
    margin: 0;
}

.close-modal {
    background: none;
    border: none;
    font-size: 2rem;
    color: #999;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #28a745;
}

.modal-body {
    padding: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
}

.form-group label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #444;
}

.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1.5px solid #eee;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    resize: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group textarea:focus {
    border-color: #28a745;
}

.form-footer {
    display: flex;
    justify-content: flex-end;
}

.submit-btn {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.submit-btn:hover {
    background: #1e7e34;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.2);
}

@media (max-width: 600px) {
    .modal-content {
        width: 95%;
    }
    .modal-body {
        padding: 20px;
    }
}

/* Aggressive mobile store nav optimization to force all tabs to fit on one row without scrolling */
@media (max-width: 768px) {
    .store-nav-tabs {
        padding: 0 !important;
        overflow: hidden !important;
    }
    .store-nav-container {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: hidden !important;
        width: 100% !important;
        gap: 2px !important;
        padding: 0 5px !important;
        justify-content: space-between !important;
    }
    /* Hide scrollbars just in case browsers still show them */
    .store-nav-container::-webkit-scrollbar {
        display: none !important;
    }
    .tab-btn {
        flex: 1 1 0% !important;
        min-width: 0 !important;
        padding: 12px 2px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        text-align: center !important;
        letter-spacing: -0.2px; /* Tighten text to fit better */
    }
}
