/* ================================================
   SAMA GREEN - Products Store Page Styles
   ================================================ */

/* Body offset for fixed nav */
.products-page {
    padding-top: 0;
}

/* ============ PAGE HERO ============ */
.page-hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
    min-height: 350px;
    display: flex;
    align-items: center;
}

.page-hero-bg {
    position: absolute;
    inset: 0;
}

.page-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(2,44,34,0.92) 0%, rgba(5,150,105,0.85) 100%);
}

.page-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.breadcrumb a {
    color: rgba(255,255,255,0.7);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb .fa-chevron-right {
    font-size: 10px;
    color: rgba(255,255,255,0.4);
}

.breadcrumb span {
    color: var(--green-300);
    font-weight: 600;
}

.page-hero h1 {
    font-family: var(--font-display);
    font-size: 48px;
    font-weight: 900;
    color: var(--white);
    margin-bottom: 12px;
}

.page-hero p {
    font-size: 18px;
    color: rgba(255,255,255,0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* ============ STORE LAYOUT ============ */
.store-section {
    padding: 60px 0 100px;
    background: var(--gray-50);
}

.store-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    align-items: flex-start;
}

/* ============ SIDEBAR ============ */
.store-sidebar {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--green-100);
    position: sticky;
    top: 90px;
}

.sidebar-close {
    display: none;
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: var(--gray-100);
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    color: var(--gray-600);
}

.sidebar-block {
    margin-bottom: 28px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--gray-200);
}

.sidebar-block:last-of-type {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.sidebar-block h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--green-900);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-block h3 i {
    color: var(--green-500);
    font-size: 14px;
}

/* Search Box */
.search-box {
    display: flex;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--green-400);
    box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 14px;
    border: none;
    outline: none;
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--gray-700);
    background: transparent;
}

.search-box button {
    padding: 12px 16px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.search-box button:hover {
    opacity: 0.9;
}

/* Category List */
.category-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.category-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    color: var(--gray-600);
    font-weight: 500;
}

.category-item:hover {
    background: var(--green-50);
    color: var(--green-700);
}

.category-item.active {
    background: var(--gradient-primary);
    color: var(--white);
}

.category-count {
    font-size: 12px;
    padding: 2px 10px;
    background: rgba(0,0,0,0.06);
    border-radius: var(--radius-xl);
    font-weight: 600;
}

.category-item.active .category-count {
    background: rgba(255,255,255,0.2);
    color: var(--white);
}

/* Price Filters */
.price-filters {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.price-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-600);
    transition: var(--transition);
    text-decoration: none;
}

.price-option:hover {
    background: var(--green-50);
    color: var(--green-700);
}

.price-option.active {
    background: var(--green-600);
    color: var(--white);
    border-radius: var(--radius-sm);
}

.price-option input {
    accent-color: var(--green-600);
    width: 16px;
    height: 16px;
}

/* Sidebar Help */
.sidebar-help {
    background: var(--gradient-light);
    border-radius: var(--radius-md) !important;
    padding: 24px !important;
    text-align: center;
    border: 1px solid var(--green-200) !important;
}

.help-icon {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 24px;
    margin: 0 auto 14px;
}

.sidebar-help h4 {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-900);
    margin-bottom: 8px;
}

.sidebar-help p {
    font-size: 13px;
    color: var(--gray-500);
    margin-bottom: 14px;
    line-height: 1.6;
}

/* ============ STORE TOOLBAR ============ */
.store-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--white);
    padding: 16px 24px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 24px;
    border: 1px solid var(--green-100);
    flex-wrap: wrap;
    gap: 12px;
}

.toolbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.filter-toggle {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 14px;
    font-weight: 600;
    color: var(--green-700);
    cursor: pointer;
}

.results-count {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sort-select select {
    padding: 8px 36px 8px 14px;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    font-family: var(--font-primary);
    font-size: 14px;
    color: var(--gray-700);
    cursor: pointer;
    outline: none;
    appearance: auto;
}

.view-toggle {
    display: flex;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.view-btn {
    padding: 8px 12px;
    background: var(--white);
    border: none;
    cursor: pointer;
    color: var(--gray-400);
    font-size: 14px;
    transition: var(--transition);
}

.view-btn.active {
    background: var(--green-600);
    color: var(--white);
}

/* ============ ACTIVE FILTERS ============ */
.active-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    align-items: center;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--green-50);
    border: 1px solid var(--green-200);
    border-radius: var(--radius-xl);
    font-size: 13px;
    font-weight: 500;
    color: var(--green-700);
}

.filter-chip .remove-filter {
    cursor: pointer;
    color: var(--green-500);
    font-size: 10px;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    background: var(--green-100);
    transition: var(--transition);
}

.filter-chip .remove-filter:hover {
    background: var(--green-600);
    color: var(--white);
}

/* ============ STORE GRID ============ */
.store-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.store-grid.list-view {
    grid-template-columns: 1fr;
}

/* Product Card - Store Version */
.store-product-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--green-100);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.store-product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--green-300);
}

.store-product-card .product-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 5px 12px;
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
    color: var(--white);
}

.product-badge.badge-bestseller { background: var(--green-600); }
.product-badge.badge-new { background: var(--gold); }
.product-badge.badge-popular { background: #6366f1; }

.store-card-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}

.store-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.store-product-card:hover .store-card-img img {
    transform: scale(1.08);
}

.card-actions {
    position: absolute;
    bottom: 12px;
    right: 12px;
    display: flex;
    gap: 8px;
    opacity: 0;
    transform: translateY(10px);
    transition: var(--transition);
}

.store-product-card:hover .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.card-action-btn {
    width: 40px;
    height: 40px;
    background: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--green-700);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 14px;
}

.card-action-btn:hover {
    background: var(--green-600);
    color: var(--white);
}

.store-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.store-card-category {
    font-size: 11px;
    font-weight: 700;
    color: var(--green-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.store-card-body h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--green-900);
    margin-bottom: 8px;
    line-height: 1.3;
}

.store-card-body p {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.6;
    margin-bottom: 14px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.store-card-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 14px;
}

.spec-tag {
    padding: 3px 10px;
    background: var(--green-50);
    border-radius: var(--radius-xl);
    font-size: 11px;
    font-weight: 500;
    color: var(--green-700);
    border: 1px solid var(--green-100);
}

.store-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid var(--gray-100);
}

.store-price {
    font-size: 22px;
    font-weight: 800;
    color: var(--green-700);
}

.store-price span {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-400);
}

/* List View Card */
.store-grid.list-view .store-product-card {
    flex-direction: row;
}

.store-grid.list-view .store-card-img {
    width: 280px;
    min-width: 280px;
    height: auto;
    min-height: 220px;
}

.store-grid.list-view .store-card-body {
    padding: 24px;
}

.store-grid.list-view .store-card-body p {
    -webkit-line-clamp: 3;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 2px dashed var(--gray-200);
}

.empty-state i {
    font-size: 60px;
    color: var(--gray-300);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-700);
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: var(--gray-400);
    margin-bottom: 24px;
}

/* ============ PRODUCT MODAL ============ */
.product-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.product-modal.active {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
}

.modal-content {
    position: relative;
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-2xl);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    background: var(--gray-100);
    border: none;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    color: var(--gray-600);
    z-index: 3;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--green-600);
    color: var(--white);
}

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.modal-image {
    height: 100%;
    min-height: 400px;
    overflow: hidden;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-details {
    padding: 40px;
}

.modal-category {
    font-size: 12px;
    font-weight: 700;
    color: var(--green-600);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.modal-details h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--green-900);
    margin-bottom: 12px;
    line-height: 1.3;
}

.modal-details .modal-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--green-700);
    margin-bottom: 16px;
}

.modal-details .modal-price span {
    font-size: 14px;
    font-weight: 400;
    color: var(--gray-400);
}

.modal-description {
    font-size: 15px;
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 24px;
}

.modal-specs {
    margin-bottom: 24px;
}

.modal-specs h4 {
    font-size: 14px;
    font-weight: 700;
    color: var(--green-900);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-specs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.modal-spec-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--green-50);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--green-800);
}

.modal-spec-item i {
    color: var(--green-500);
    font-size: 12px;
}

.modal-actions {
    display: flex;
    gap: 12px;
}

.modal-actions .btn {
    flex: 1;
    justify-content: center;
}

.btn-outline-green {
    background: transparent;
    color: var(--green-700);
    border: 2px solid var(--green-300);
    padding: 14px 24px;
    border-radius: var(--radius-xl);
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-outline-green:hover {
    background: var(--green-50);
    border-color: var(--green-500);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
    .store-layout {
        grid-template-columns: 1fr;
    }

    .store-sidebar {
        position: fixed;
        top: 0;
        left: -320px;
        width: 300px;
        height: 100vh;
        z-index: 9999;
        border-radius: 0;
        overflow-y: auto;
        transition: left 0.3s ease;
    }

    .store-sidebar.active {
        left: 0;
    }

    .sidebar-close {
        display: flex;
    }

    .filter-toggle {
        display: flex;
    }

    .store-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .modal-grid {
        grid-template-columns: 1fr;
    }

    .modal-image {
        min-height: 250px;
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 130px 0 60px;
    }

    .page-hero h1 {
        font-size: 34px;
    }

    .store-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .store-grid.list-view .store-product-card {
        flex-direction: column;
    }

    .store-grid.list-view .store-card-img {
        width: 100%;
        min-width: unset;
        height: 200px;
    }

    .modal-details {
        padding: 24px;
    }

    .modal-specs-grid {
        grid-template-columns: 1fr;
    }

    .modal-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .store-grid {
        grid-template-columns: 1fr;
    }

    .page-hero h1 {
        font-size: 28px;
    }

    .store-toolbar {
        padding: 12px 16px;
    }

    .toolbar-right {
        width: 100%;
        justify-content: space-between;
    }
}
