/* E-MAX SHOP - STYLES REBUILD
   Design Profesional: Alb-Albastru-Portocaliu */

:root {
    --primary: #007bff;
    --secondary: #ff6b35;
    --dark: #1a1a2e;
    --light: #f8f9fa;
    --white: #ffffff;
    --gray: #6c757d;
    --success: #28a745;
    --danger: #dc3545;
    --sans: 'Inter', -apple-system, sans-serif;
    --serif: 'Playfair Display', Georgia, serif;
}

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

body {
    font-family: var(--sans);
    color: var(--dark);
    line-height: 1.6;
    background: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 40px;
}

.serif { font-family: var(--serif); }

/* HEADER */
.header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo {
    text-decoration: none;
    color: var(--dark);
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.nav {
    display: flex;
    gap: 1rem;
    flex: 1;
}

.nav-link {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
    white-space: nowrap;
}

.nav-link:hover {
    background: var(--light);
    color: var(--primary);
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-input {
    width: 100%;
    padding: 0.7rem 3rem 0.7rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 0.9rem;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
}

.search-box i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray);
}

.header-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    background: var(--light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
    position: relative;
}

.action-btn:hover {
    background: var(--primary);
    color: white;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
}

/* HERO */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: white;
    padding: 5rem 0;
    text-align: center;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background: var(--gray);
    color: white;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.btn-block { width: 100%; justify-content: center; }

/* CATEGORIES */
.categories-section {
    padding: 3rem 0;
    background: var(--light);
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.category-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.category-card p { color: var(--gray); }

/* PRODUCTS */
.products-section { padding: 4rem 0; }

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-header h2 { font-size: 2rem; }

.link-see-all {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1.5rem;
}

.product-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.product-img {
    position: relative;
    height: 250px;
    background: var(--light);
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
}

.badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: white;
}

.badge.sale { background: var(--secondary); }
.badge.new { background: var(--success); }

.product-brand {
    padding: 1rem 1rem 0;
    color: var(--gray);
    font-size: 0.85rem;
    font-weight: 600;
}

.product-name {
    padding: 0.5rem 1rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.product-desc {
    padding: 0 1rem;
    color: var(--gray);
    font-size: 0.85rem;
}

.product-bottom {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.product-price {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 0.85rem;
}

.price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}

.btn-add-cart {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.btn-add-cart:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* FEATURES */
.features-section {
    padding: 4rem 0;
    background: var(--light);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2rem;
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--gray); }

/* FOOTER */
.footer {
    background: var(--dark);
    color: white;
    padding: 3rem 0 1rem;
    margin-top: auto;
}

.main-content {
    flex: 1;
}

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

.footer-col h3, .footer-col h4 { margin-bottom: 1rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 0.5rem; }

.footer-col a {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
}

.footer-col a:hover { color: white; }

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover { background: var(--primary); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    text-align: center;
    color: rgba(255,255,255,0.6);
}

/* LOADING */
.loading-placeholder {
    padding: 3rem;
    text-align: center;
    color: var(--gray);
}

.loading-placeholder i {
    font-size: 2rem;
    color: var(--primary);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.bg-light { background: var(--light); }

/* RESPONSIVE */
/* ============================================
   RESPONSIVE PRODUCTS GRID
   ============================================ */
@media (max-width: 1200px) {
    .products-grid { grid-template-columns: repeat(4, 1fr); }
}

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


/* ============================================
   SHOP PAGE - FILTERS & SIDEBAR
   ============================================ */
.shop-page { padding: 2rem 0; }

.shop-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

/* Shop are sidebar - grila mai mica */
.shop-layout .products-grid {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1200px) {
    .shop-layout .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 960px) {
    .shop-layout .products-grid { grid-template-columns: repeat(2, 1fr); }
}

.shop-sidebar {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.filter-section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--light);
}

.filter-section:last-child {
    border-bottom: none;
}

.filter-section h3 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.filter-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.filter-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 6px;
    transition: background 0.2s;
}

.filter-item:hover {
    background: var(--light);
}

.filter-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.price-range {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-range input {
    flex: 1;
    padding: 0.6rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
}

.price-range button {
    padding: 0.6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    flex-shrink: 0;
}

.shop-content { min-height: 500px; }

.shop-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.toolbar-left {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-info {
    font-size: 0.95rem;
    color: var(--gray);
}

.results-count {
    font-size: 0.9rem;
    color: var(--gray);
}

.sort-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.page-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.page-dots {
    padding: 0.6rem 0.5rem;
    color: var(--gray);
}

.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 12px;
}

.no-results i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.no-results h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* ============================================
   PRODUCT PAGE
   ============================================ */
.product-page { padding: 2rem 0; }

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb i {
    font-size: 0.7rem;
    color: var(--gray);
}

.product-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.product-gallery { position: relative; }

.gallery-main {
    background: var(--light);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1rem;
    position: relative;
}

.gallery-main img {
    width: 100%;
    height: 500px;
    object-fit: contain;
}

.badge-discount, .badge-new {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 700;
    color: white;
}

.badge-discount { background: var(--secondary); }
.badge-new { background: var(--success); }

.gallery-thumbs {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
    margin-top: 0.8rem;
}

.thumb-item {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    overflow: hidden;
    background: var(--light);
    flex-shrink: 0;
}

.thumb-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 0.4rem;
}

.thumb-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(0,98,204,0.25);
}

.thumb-item:hover {
    border-color: #aaa;
}

/* Legacy - keep for non-thumb-item usage */
.gallery-thumbs img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    padding: 0.5rem;
    background: var(--light);
    border-radius: 8px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.gallery-thumbs img:hover {
    border-color: var(--primary);
}

.gallery-thumbs img.active {
    border-color: var(--primary);
}

.product-info { padding-top: 1rem; }

.product-brand {
    color: var(--gray);
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-title {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.product-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stars {
    display: flex;
    gap: 0.2rem;
    color: #ffc107;
}

.rating-text {
    font-size: 0.9rem;
    color: var(--gray);
}

.product-price-box {
    background: var(--light);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.old-price {
    text-decoration: line-through;
    color: var(--gray);
    font-size: 1.1rem;
}

.savings {
    color: var(--success);
    font-weight: 600;
    font-size: 0.9rem;
    margin-top: 0.3rem;
}

.current-price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-top: 0.5rem;
}

.product-short-desc {
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 2rem;
}

.product-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.quantity-selector {
    display: flex;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.quantity-selector button {
    padding: 0.8rem 1.2rem;
    border: none;
    background: white;
    cursor: pointer;
    transition: background 0.2s;
}

.quantity-selector button:hover {
    background: var(--light);
}

.quantity-selector input {
    width: 60px;
    text-align: center;
    border: none;
    border-left: 1px solid #e0e0e0;
    border-right: 1px solid #e0e0e0;
    font-weight: 600;
}

.btn-add-cart {
    flex: 1;
}

.btn-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.product-meta {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.meta-item i {
    color: var(--primary);
}

.product-tabs {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 3rem;
}

.tabs-nav {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--light);
    margin-bottom: 2rem;
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: none;
    cursor: pointer;
    font-weight: 600;
    color: var(--gray);
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

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

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

.tab-pane {
    display: none;
}

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

.specs-group {
    margin-bottom: 2rem;
}

.specs-group h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--light);
}

.specs-table {
    width: 100%;
    border-collapse: collapse;
}

.specs-table tr {
    border-bottom: 1px solid var(--light);
}

.specs-table td {
    padding: 1rem;
}

.spec-name {
    font-weight: 600;
    width: 30%;
}

.spec-value {
    color: var(--gray);
}

.related-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: var(--primary);
}

.products-slider {
    position: relative;
    overflow: hidden;
}

.slider-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.3s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--primary);
    color: var(--primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: all 0.2s;
}

.slider-btn:hover {
    background: var(--primary);
    color: white;
}

.slider-btn.prev { left: -25px; }
.slider-btn.next { right: -25px; }

/* ============================================
   CART & CHECKOUT
   ============================================ */
.cart-page, .checkout-page {
    padding: 2rem 0;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.cart-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.cart-item {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.cart-item-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: var(--light);
    border-radius: 8px;
    padding: 0.5rem;
}

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

.cart-item-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.3rem;
}

.cart-item-info .brand {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.cart-item-info .price {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
}

.cart-item-qty {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.cart-item-qty button {
    width: 35px;
    height: 35px;
    border: 1px solid #e0e0e0;
    background: white;
    border-radius: 6px;
    cursor: pointer;
}

.cart-item-qty input {
    width: 50px;
    text-align: center;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 0.5rem;
}

.cart-item-total {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
}

.btn-remove {
    background: none;
    border: none;
    color: var(--danger);
    cursor: pointer;
    padding: 0.5rem;
    transition: transform 0.2s;
}

.btn-remove:hover {
    transform: scale(1.2);
}

.cart-summary, .order-summary {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.cart-summary h3, .order-summary h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--light);
}

.summary-row.total {
    font-size: 1.3rem;
    font-weight: 700;
    border-top: 2px solid var(--dark);
    margin-top: 1rem;
    padding-top: 1rem;
}

.summary-note {
    background: #e3f2fd;
    padding: 0.8rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--primary);
    margin: 1rem 0;
}

.empty-cart {
    text-align: center;
    padding: 4rem;
}

.empty-cart i {
    font-size: 5rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

/* CHECKOUT */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
}

.checkout-section {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.checkout-section h2 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.payment-methods {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.payment-method {
    cursor: pointer;
}

.payment-method input {
    display: none;
}

.method-box {
    padding: 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    text-align: center;
    transition: all 0.2s;
}

.payment-method input:checked + .method-box {
    border-color: var(--primary);
    background: #e3f2fd;
}

.method-box i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.card-fields {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 12px;
}

/* AUTH PAGES */
.auth-page {
    padding: 4rem 0;
    background: var(--light);
    min-height: 70vh;
}

.auth-box {
    max-width: 450px;
    margin: 0 auto;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.auth-links a {
    color: var(--primary);
    text-decoration: none;
}

/* RESPONSIVE */
@media (max-width: 968px) {
    .shop-layout,
    .cart-layout,
    .checkout-layout,
    .product-main {
        grid-template-columns: 1fr;
    }
    
    .shop-sidebar,
    .cart-summary,
    .order-summary {
        position: relative;
        top: 0;
    }
}

/* ============================================
   ACCOUNT PAGE
   ============================================ */
.account-page {
    padding: 2rem 0;
}

.account-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.account-sidebar {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.account-user {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--light);
    margin-bottom: 1.5rem;
}

.account-user i {
    font-size: 4rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.account-user h3 {
    font-size: 1.1rem;
}

.account-menu {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 1rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: all 0.2s;
}

.menu-item:hover {
    background: var(--light);
    color: var(--primary);
}

.menu-item.active {
    background: var(--primary);
    color: white;
}

.menu-item.logout {
    color: var(--danger);
    margin-top: 1rem;
    border-top: 1px solid var(--light);
    padding-top: 1.5rem;
}

.account-content {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    min-height: 400px;
}

.empty-state {
    text-align: center;
    padding: 3rem;
}

.empty-state i {
    font-size: 4rem;
    color: var(--gray);
    margin-bottom: 1rem;
}

.profile-form {
    max-width: 600px;
}

/* ============================================
   ADMIN PANEL
   ============================================ */
.admin-page {
    padding: 2rem 0;
    background: var(--light);
    min-height: 70vh;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.admin-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 12px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.admin-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.admin-card i {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.admin-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.admin-card p {
    color: var(--gray);
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: var(--dark);
    color: white;
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--light);
}

.admin-table tbody tr:hover {
    background: var(--light);
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-select {
    padding: 0.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    cursor: pointer;
}

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

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.error-message {
    text-align: center;
    padding: 4rem 2rem;
}

.error-message i {
    font-size: 5rem;
    color: var(--danger);
    margin-bottom: 1rem;
}

.error-message h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* ============================================
   RESPONSIVE - MOBILE
   ============================================ */
@media (max-width: 968px) {
    .account-layout {
        grid-template-columns: 1fr;
    }
    
    .account-sidebar {
        position: relative;
        top: 0;
    }
    
    .admin-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   BARE ANIMATE PRODUSE - AUTO SCROLL 38s
   ============================================ */
.products-slider {
    position: relative;
    overflow: hidden;
    padding: 1rem 0;
}

.products-slider.static-mode {
    overflow: visible;
    padding: 0;
    height: auto;
}

.products-slider.static-mode .slider-track {
    width: 100% !important;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 1.5rem;
}

.products-slider.static-mode {
    overflow: visible;
    padding: 0;
}

.slider-track {
    display: flex;
    gap: 2rem;
    /* Animatia e controlata de JS via clasa .do-animate */
    width: max-content;
}

.slider-track.do-animate {
    animation: autoScroll 20s linear infinite;
}

.slider-track.do-animate:hover {
    animation-play-state: paused;
}

/* Animație scroll continuu stânga - loop real */
@keyframes autoScroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Produsele din slider mai late */
.slider-track .product-card {
    min-width: 320px;
    flex-shrink: 0;
}

/* Ascunde butoanele de navigare manuală */
.slider-btn {
    display: none;
}

/* Container mai înalt pentru slider */
.related-section {
    margin-bottom: 4rem;
    padding: 2rem 0;
}

/* ============================================
   ADMIN PANEL - STILURI COMPLETE
   ============================================ */
.admin-page {
    padding: 3rem 0;
    background: var(--light);
    min-height: 80vh;
}

.admin-page .page-title {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--dark);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-page .page-title i {
    color: var(--primary);
}

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

.admin-card {
    background: white;
    padding: 3rem 2rem;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.admin-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 12px 40px rgba(0,123,255,0.2);
    border-color: var(--primary);
}

.admin-card i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--primary);
    display: block;
}

.admin-card h3 {
    font-size: 1.6rem;
    margin-bottom: 0.8rem;
    font-family: var(--serif);
    color: var(--dark);
}

.admin-card p {
    color: var(--gray);
    font-size: 1rem;
    line-height: 1.5;
}

/* Admin Header */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.admin-header .page-title {
    margin: 0;
    font-size: 2rem;
}

/* Tables */
.table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table thead {
    background: linear-gradient(135deg, var(--primary) 0%, #0056b3 100%);
    color: white;
}

.admin-table th {
    padding: 1.2rem 1.5rem;
    text-align: left;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 1.2rem 1.5rem;
    border-bottom: 1px solid var(--light);
    font-size: 0.95rem;
}

.admin-table tbody tr {
    transition: background 0.2s;
}

.admin-table tbody tr:hover {
    background: #f8f9fa;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

/* Status Badges */
.badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge.success {
    background: #d4edda;
    color: #155724;
}

.badge.danger {
    background: #f8d7da;
    color: #721c24;
}

.badge.warning {
    background: #fff3cd;
    color: #856404;
}

.badge.info {
    background: #d1ecf1;
    color: #0c5460;
}

/* Status Select */
.status-select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.status-select:hover {
    border-color: var(--primary);
}

.status-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

/* Alerts */
.alert {
    padding: 1.2rem 1.8rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1rem;
    font-weight: 500;
}

.alert i {
    font-size: 1.5rem;
}

.alert.success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert.error {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert.info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* Button Small */
.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
}

/* Responsive Admin */
@media (max-width: 768px) {
    .admin-grid {
        grid-template-columns: 1fr;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .admin-table {
        min-width: 600px;
    }
}

/* ============================================
   FIX-URI FINALE
   ============================================ */

/* Buton Add to Cart mai mare și mai vizibil */
.btn-add-cart {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-card .btn-add-cart {
    width: 32px !important;
    margin-top: 0;
}

/* Interval preț mai îngust */
.price-range {
    flex-direction: column;
    gap: 0.8rem;
}

.price-range input {
    width: 100%;
}

.price-range button {
    width: 100%;
}

/* Textarea observații mai mare */
.checkout-section textarea {
    min-height: 120px !important;
    resize: vertical;
}

/* Dropdown user în header */
.user-dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 220px;
    padding: 0.5rem 0;
    display: none;
    z-index: 1000;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 1.2rem;
    color: var(--dark);
    text-decoration: none;
    transition: background 0.2s;
}

.dropdown-menu a:hover {
    background: var(--light);
}

.dropdown-menu a.admin-link {
    color: var(--primary);
    font-weight: 600;
}

.dropdown-menu a.logout-link {
    color: var(--danger);
}

.dropdown-menu hr {
    margin: 0.3rem 0;
    border: none;
    border-top: 1px solid var(--light);
}

/* ============================================
   FIX-URI FINALE - TOATE
   ============================================ */

/* Buton add to cart PĂTRAT în product cards */
.product-card .btn-add-cart {
    width: 32px !important;
    height: 32px !important;
    padding: 0 !important;
    border-radius: 6px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.product-card .btn-add-cart i {
    margin: 0 !important;
}

/* Buton admin vizibil in header */
.action-btn.admin-btn {
    background: var(--secondary);
    color: white;
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
}
.action-btn.admin-btn:hover {
    background: #c0392b;
    color: white;
}

/* Bare produse mai mici */
.related-section .product-card {
    min-width: 240px !important;
    max-width: 240px !important;
}

.related-section .product-img {
    height: 200px !important;
}

.related-section .product-name {
    font-size: 0.95rem !important;
}

.related-section .price {
    font-size: 1.1rem !important;
}

/* ============================================
   VARIANTE PRODUS (Culori + Stocare)
   ============================================ */
.variants-section {
    margin: 1.2rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.variant-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.variant-label {
    font-size: 0.9rem;
    color: #555;
}

.variant-label strong {
    color: #111;
    font-weight: 600;
}

.color-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.color-swatch {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.15s;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    padding: 0;
}

.color-swatch:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.color-swatch.active {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.3);
    transform: scale(1.08);
}

.storage-options {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.storage-btn {
    padding: 0.35rem 0.85rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    color: #444;
    transition: all 0.15s;
}

.storage-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.storage-btn.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* ── Variante - disponibilitate ───────────────────────────── */
.storage-btn.unavail {
    border-color: #dee2e6 !important;
    color: #aaa !important;
    background: #f8f9fa !important;
    cursor: not-allowed !important;
    text-decoration: line-through;
}
.storage-btn small { font-size: 0.7em; }
.color-swatch .swatch-x {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    font-size: 0.7rem;
    color: #dc3545;
    font-weight: 900;
}
.color-swatch { position: relative; }

/* ============================================================
   ADMIN PANEL - RESPONSIVE COMPLET
   Adaptat automat la orice rezolutie
   ============================================================ */

/* --- Container admin la latime maxima pe orice ecran --- */
.ap.container,
.admin-page .container,
.container {
    max-width: 1400px;
    padding: 0 clamp(12px, 2vw, 24px);
    box-sizing: border-box;
    width: 100%;
}

/* --- Tabel produse admin --- */
@media (max-width: 1100px) {
    #ptbl td:nth-child(3) { display: none; } /* ascunde brand pe ecrane medii */
}

@media (max-width: 900px) {
    /* Grid-uri 2 coloane -> 1 coloana */
    .ap > div[style*="grid-template-columns:1fr 1fr"],
    .ap > div > div[style*="grid-template-columns:1fr 1fr"],
    .ap > div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Grid poze + upload -> stacked */
    div[style*="grid-template-columns:1fr 280px"],
    div[style*="grid-template-columns:1fr 300px"],
    div[style*="grid-template-columns:1fr 320px"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Tabel produse - scroll orizontal */
    #ptbl { font-size: .8rem; }
    #ptbl td, #ptbl th { padding: .6rem .7rem; }
    #ptbl td:nth-child(1) { display: none; } /* ascunde ID */

    /* Grid specificatii -> stacked */
    .card div[style*="grid-template-columns:1fr 300px"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Tabel comenzi admin */
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) { display: none; }
}

@media (max-width: 700px) {
    /* Header nav pe mobil */
    .nav-menu { display: none; }
    
    /* Admin top bar */
    .ap-top { flex-direction: column; align-items: flex-start !important; }
    .ap-top > div { width: 100%; display: flex; gap: .5rem; }
    .ap-top > div a, .ap-top > div button { flex: 1; text-align: center; justify-content: center; }

    /* Galerie poze: mai putine coloane */
    div[style*="grid-template-columns:repeat(auto-fill,minmax(160px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    div[style*="grid-template-columns:repeat(auto-fill,minmax(145px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* frow -> 1 coloana */
    .frow { grid-template-columns: 1fr !important; }
    .vf-grid { grid-template-columns: 1fr !important; }

    /* Card padding mai mic */
    .card { padding: 1rem !important; }

    /* Tabel produse - scroll pe ecrane mici */
    .card > div[style*="overflow-x:auto"] { overflow-x: auto; }
    #ptbl { min-width: 500px; }

    /* Account layout */
    .account-layout { grid-template-columns: 1fr !important; }
}

/* --- Tabela produse: scroll orizontal pe orice latime --- */
.card > div > table,
#ptbl {
    min-width: 100%;
}

/* --- Input-uri si butoane full-width pe mobil --- */
@media (max-width: 700px) {
    .btn-blue,
    button[style*="width:100%"] { font-size: .88rem !important; padding: .75rem !important; }
    
    .fg input, .fg select, .fg textarea { font-size: 16px !important; } /* previne zoom iOS */
}

/* --- Fix header pe ecrane inguste --- */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: .5rem; }
    .search-bar { order: 3; width: 100%; max-width: 100% !important; }
    .header-actions { gap: .5rem; }
    .action-btn span { display: none; } /* ascunde text langa icon */
    .nav-menu { overflow-x: auto; flex-wrap: nowrap; gap: .8rem; }
    .nav-menu a { white-space: nowrap; font-size: .82rem; }
}

/* --- Checkout / Cont responsive --- */
@media (max-width: 768px) {
    .checkout-layout,
    .order-detail-grid { grid-template-columns: 1fr !important; }
    .items-table th:nth-child(2), .items-table td:nth-child(2) { display: none; } /* ascunde SKU */
}

/* ============================================================
   ADMIN PANEL - RESPONSIVE COMPLET
   Adaptat automat la orice rezolutie
   ============================================================ */

/* --- Container admin la latime maxima pe orice ecran --- */
.ap.container,
.admin-page .container,
.container {
    max-width: 1400px;
    padding: 0 clamp(12px, 2vw, 24px);
    box-sizing: border-box;
    width: 100%;
}

/* --- Tabel produse admin --- */
@media (max-width: 1100px) {
    #ptbl td:nth-child(3) { display: none; } /* ascunde brand pe ecrane medii */
}

@media (max-width: 900px) {
    /* Grid-uri 2 coloane -> 1 coloana */
    .ap > div[style*="grid-template-columns:1fr 1fr"],
    .ap > div > div[style*="grid-template-columns:1fr 1fr"],
    .ap > div[style*="grid-template-columns: 1fr 1fr"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Grid poze + upload -> stacked */
    div[style*="grid-template-columns:1fr 280px"],
    div[style*="grid-template-columns:1fr 300px"],
    div[style*="grid-template-columns:1fr 320px"] {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* Tabel produse - scroll orizontal */
    #ptbl { font-size: .8rem; }
    #ptbl td, #ptbl th { padding: .6rem .7rem; }
    #ptbl td:nth-child(1) { display: none; } /* ascunde ID */

    /* Grid specificatii -> stacked */
    .card div[style*="grid-template-columns:1fr 300px"] {
        display: flex !important;
        flex-direction: column !important;
    }

    /* Tabel comenzi admin */
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) { display: none; }
}

@media (max-width: 700px) {
    /* Header nav pe mobil */
    .nav-menu { display: none; }
    
    /* Admin top bar */
    .ap-top { flex-direction: column; align-items: flex-start !important; }
    .ap-top > div { width: 100%; display: flex; gap: .5rem; }
    .ap-top > div a, .ap-top > div button { flex: 1; text-align: center; justify-content: center; }

    /* Galerie poze: mai putine coloane */
    div[style*="grid-template-columns:repeat(auto-fill,minmax(160px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    div[style*="grid-template-columns:repeat(auto-fill,minmax(145px"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* frow -> 1 coloana */
    .frow { grid-template-columns: 1fr !important; }
    .vf-grid { grid-template-columns: 1fr !important; }

    /* Card padding mai mic */
    .card { padding: 1rem !important; }

    /* Tabel produse - scroll pe ecrane mici */
    .card > div[style*="overflow-x:auto"] { overflow-x: auto; }
    #ptbl { min-width: 500px; }

    /* Account layout */
    .account-layout { grid-template-columns: 1fr !important; }
}

/* --- Tabela produse: scroll orizontal pe orice latime --- */
.card > div > table,
#ptbl {
    min-width: 100%;
}

/* --- Input-uri si butoane full-width pe mobil --- */
@media (max-width: 700px) {
    .btn-blue,
    button[style*="width:100%"] { font-size: .88rem !important; padding: .75rem !important; }
    
    .fg input, .fg select, .fg textarea { font-size: 16px !important; } /* previne zoom iOS */
}

/* --- Fix header pe ecrane inguste --- */
@media (max-width: 768px) {
    .header-inner { flex-wrap: wrap; gap: .5rem; }
    .search-bar { order: 3; width: 100%; max-width: 100% !important; }
    .header-actions { gap: .5rem; }
    .action-btn span { display: none; } /* ascunde text langa icon */
    .nav-menu { overflow-x: auto; flex-wrap: nowrap; gap: .8rem; }
    .nav-menu a { white-space: nowrap; font-size: .82rem; }
}

/* --- Checkout / Cont responsive --- */
@media (max-width: 768px) {
    .checkout-layout,
    .order-detail-grid { grid-template-columns: 1fr !important; }
    .items-table th:nth-child(2), .items-table td:nth-child(2) { display: none; } /* ascunde SKU */
}

/* ============================================================
   HAMBURGER + MOBILE NAV DRAWER
   ============================================================ */

/* Hamburger button - ascuns pe desktop */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    z-index: 1001;
}
.hamburger span {
    display: block;
    height: 2.5px;
    width: 100%;
    background: #222;
    border-radius: 3px;
    transition: all 0.3s cubic-bezier(.4,0,.2,1);
    transform-origin: center;
}
/* Animatie X la deschidere */
.hamburger.open span:nth-child(1) { transform: translateY(8.75px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-8.75px) rotate(-45deg); }

/* Overlay semitraparent */
.mobile-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 999;
    backdrop-filter: blur(2px);
}
.mobile-overlay.open { display: block; }

/* Drawer lateral */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: white;
    z-index: 1000;
    display: none;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.15);
    overflow-y: auto;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(.4,0,.2,1);
}
.mobile-nav.open {
    display: flex;
    transform: translateX(0);
}

.mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.2rem 1.2rem 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-user {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: 1rem 1.2rem;
    background: #f8faff;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    padding: .5rem 0;
    flex: 1;
}
.mobile-nav-links a {
    display: flex;
    align-items: center;
    gap: .8rem;
    padding: .85rem 1.4rem;
    color: #333;
    text-decoration: none;
    font-size: .95rem;
    font-weight: 500;
    transition: background 0.15s;
    border-left: 3px solid transparent;
}
.mobile-nav-links a:hover {
    background: #f8f9fa;
    border-left-color: var(--primary);
    color: var(--primary);
}
.mobile-nav-links a i {
    width: 20px;
    text-align: center;
    color: #888;
    font-size: .9rem;
}
.mobile-nav-links a:hover i { color: var(--primary); }

.mobile-nav-divider {
    height: 1px;
    background: #f0f0f0;
    margin: .4rem 1.2rem;
}

.mobile-nav-search {
    padding: 1rem 1.2rem;
    border-top: 1px solid #f0f0f0;
}

/* Arata hamburger pe mobil, ascunde nav desktop */
@media (max-width: 900px) {
    .hamburger { display: flex; }
    .nav { display: none; }
    
    /* Header layout pe mobil */
    .header-content {
        display: flex;
        align-items: center;
        gap: .8rem;
    }
    .logo { flex: 1; }
    .search-box { display: none; } /* search e in drawer */
}

@media (max-width: 600px) {
    /* Ascunde textul langa user si cos */
    .action-btn span:not(.cart-count) { display: none; }
    .header-content { gap: .5rem; }
}

/* ============================================================
   HAMBURGER + MOBILE DRAWER — CLEAN VERSION
   ============================================================ */

/* Buton hamburger — ASCUNS pe desktop, vizibil pe mobil */
.hamburger-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: #333;
    font-size: 1.25rem;
    transition: background .15s;
    flex-shrink: 0;
}
.hamburger-btn:hover { background: #f0f0f0; }

/* Overlay */
.m-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 8000;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}
.m-overlay.is-open { display: block; }

/* Drawer */
.m-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    max-width: 85vw;
    height: 100%;
    height: 100dvh;
    background: #fff;
    z-index: 9000;
    display: flex;
    flex-direction: column;
    box-shadow: 6px 0 30px rgba(0,0,0,.18);
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(-100%);
    transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.m-drawer.is-open { transform: translateX(0); }

/* Scroll lock */
body.no-scroll { overflow: hidden; }

/* Drawer header */
.m-drawer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.1rem;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}
.m-close-btn {
    width: 34px; height: 34px;
    border: none; background: #f5f5f5; border-radius: 50%;
    cursor: pointer; font-size: 1rem; color: #555;
    display: flex; align-items: center; justify-content: center;
    transition: background .15s;
}
.m-close-btn:hover { background: #e0e0e0; }

/* User strip */
.m-user {
    display: flex; align-items: center; gap: .8rem;
    padding: .9rem 1.1rem;
    background: #f8faff;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

/* Nav links */
.m-links {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: .4rem 0;
}
.m-links a {
    display: flex; align-items: center; gap: .8rem;
    padding: .82rem 1.2rem;
    color: #333; text-decoration: none;
    font-size: .93rem; font-weight: 500;
    border-left: 3px solid transparent;
    transition: background .12s, border-color .12s;
}
.m-links a i {
    width: 18px; text-align: center;
    color: #aaa; font-size: .88rem;
    transition: color .12s;
}
.m-links a:hover {
    background: #f5f8ff;
    border-left-color: var(--primary);
    color: var(--primary);
}
.m-links a:hover i { color: var(--primary); }

/* Arata hamburger + ascunde desktop nav sub 900px */
@media (max-width: 900px) {
    .hamburger-btn { display: flex; }
    .desktop-nav   { display: none !important; }
    .desktop-search{ display: none !important; }
    .action-label  { display: none; }
}
@media (min-width: 901px) {
    .m-drawer, .m-overlay { display: none !important; }
}