/* ============================================================
   style.css - Stili per Accessori Moda E-commerce
   CSS puro, design responsivo mobile-first
   ============================================================ */

/* ============================================================
   RESET E BASE
   ============================================================ */

/* Skip link per accessibilità tastiera */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-primary);
    color: #fff !important;
    padding: 0.5rem 1rem;
    z-index: 9999;
    font-weight: 600;
    border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
    top: 0;
}
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #6b3a5e;
    --color-primary-dark: #4a2740;
    --color-primary-light: #9b5a8a;
    --color-accent: #c9a96e;
    --color-accent-light: #f0e6d2;
    --color-bg: #fafafa;
    --color-white: #ffffff;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-border: #e0e0e0;
    --color-error: #d32f2f;
    --color-error-bg: #ffebee;
    --color-success: #388e3c;
    --color-success-bg: #e8f5e9;
    --color-warning: #f57c00;
    --color-warning-bg: #fff3e0;
    --color-info: #1976d2;
    --color-info-bg: #e3f2fd;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,.12);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1200px;
    --navbar-height: 64px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color 0.2s;
}

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

img {
    max-width: 100%;
    height: auto;
}

.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1rem;
}

.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--navbar-height);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand i {
    color: var(--color-accent);
}

.navbar-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.25rem;
}

.navbar-menu > li > a {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.925rem;
    transition: background 0.2s;
}

.navbar-menu > li > a:hover {
    background: var(--color-accent-light);
    color: var(--color-primary-dark);
}

.navbar-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

.btn-register {
    background: var(--color-primary) !important;
    color: var(--color-white) !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-md) !important;
}

.btn-register:hover {
    background: var(--color-primary-dark) !important;
}

.cart-badge {
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    position: relative;
    top: -8px;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    min-width: 180px;
    list-style: none;
    padding: 0.5rem 0;
    z-index: 1001;
}

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

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: var(--color-text);
    font-size: 0.9rem;
}

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

/* ============================================================
   CATEGORIES BAR
   ============================================================ */
.categories-bar {
    background: var(--color-white);
    border-bottom: 1px solid var(--color-border);
    padding: 0.5rem 0;
}

.categories-bar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.categories-list {
    display: flex;
    list-style: none;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.cat-link {
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    color: var(--color-text-light);
    transition: all 0.2s;
}

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

.search-form {
    display: flex;
    align-items: center;
}

.search-form input {
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    font-size: 0.875rem;
    width: 180px;
    outline: none;
}

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

.search-form button {
    padding: 0.4rem 0.75rem;
    background: var(--color-primary);
    color: var(--color-white);
    border: none;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    cursor: pointer;
    font-size: 0.875rem;
}

.search-form button:hover {
    background: var(--color-primary-dark);
}

/* ============================================================
   ALERT / FLASH MESSAGES
   ============================================================ */
.alert {
    padding: 0.75rem 0;
}

.alert-success {
    background: var(--color-success-bg);
    color: var(--color-success);
    border-bottom: 2px solid var(--color-success);
}

.alert-error {
    background: var(--color-error-bg);
    color: var(--color-error);
    border-bottom: 2px solid var(--color-error);
}

.alert .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.alert-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    padding: 0.6rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.925rem;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    line-height: 1.4;
}

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

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

.btn-secondary {
    background: var(--color-text-light);
    color: var(--color-white) !important;
}

.btn-secondary:hover {
    background: var(--color-text);
}

.btn-accent {
    background: var(--color-accent);
    color: var(--color-white) !important;
}

.btn-accent:hover {
    background: #b8953d;
}

.btn-outline {
    background: transparent;
    color: var(--color-primary) !important;
    border: 2px solid var(--color-primary);
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white) !important;
}

.btn-sm {
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
}

.btn-lg {
    padding: 0.8rem 1.75rem;
    font-size: 1.05rem;
}

.btn-danger {
    background: var(--color-error);
    color: var(--color-white) !important;
}

.btn-danger:hover {
    background: #b71c1c;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ============================================================
   FORMS
   ============================================================ */
.form-group {
    margin-bottom: 1rem;
}

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

.form-control {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    transition: border-color 0.2s;
    font-family: inherit;
}

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

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

select.form-control {
    background: var(--color-white);
}

.form-error {
    color: var(--color-error);
    font-size: 0.825rem;
    margin-top: 0.25rem;
}

.form-error-bg {
    background: var(--color-error-bg);
    border: 1px solid var(--color-error) !important;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.form-text {
    font-size: 0.825rem;
    color: var(--color-text-muted);
    margin-top: 0.25rem;
}

/* ============================================================
   PRODUCT GRID
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}

.product-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* Link invisibile che rende l'intera card cliccabile */
.product-card-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    text-decoration: none;
}

/* Form carrello sopra il link overlay */
.product-card-cart-form {
    position: relative;
    z-index: 2;
}

.product-card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 3rem;
}

.product-card-body {
    padding: 1rem;
}

.product-card-category {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.product-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.product-card-title a {
    color: var(--color-text);
}

.product-card-title a:hover {
    color: var(--color-primary);
}

.product-card-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.75rem;
}

.product-card-actions {
    display: flex;
    gap: 0.5rem;
}

/* ============================================================
   PRODUCT DETAIL
   ============================================================ */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.product-detail-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius-md);
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-size: 5rem;
}

.product-detail-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.product-detail-category {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.product-detail-name {
    font-size: 1.8rem;
    font-weight: 700;
}

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

.product-detail-description {
    color: var(--color-text-light);
    line-height: 1.7;
}

.product-detail-stock {
    font-size: 0.9rem;
    font-weight: 600;
}

.stock-available {
    color: var(--color-success);
}

.stock-low {
    color: var(--color-warning);
}

.stock-out {
    color: var(--color-error);
}

.product-detail-form {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.product-detail-form input[type="number"] {
    width: 70px;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 1rem;
}

/* ============================================================
   CART
   ============================================================ */
.cart-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.cart-table th {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.875rem;
    text-transform: uppercase;
}

.cart-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
}

.cart-table img,
.cart-item-img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    background: #f5f5f5;
}

.cart-item-name {
    font-weight: 600;
}

.cart-item-name a {
    color: var(--color-text);
}

.cart-item-price {
    font-weight: 600;
    color: var(--color-primary);
}

.cart-qty-input {
    width: 55px;
    padding: 0.4rem 0.25rem;
    border: 1px solid var(--color-border);
    border-radius: 0;
    text-align: center;
    font-size: 0.95rem;
    -moz-appearance: textfield;
}
.cart-qty-input::-webkit-inner-spin-button,
.cart-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.cart-qty-btn {
    width: 44px;
    height: 44px;
    border: 1px solid var(--color-border);
    background: var(--color-bg);
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text);
    transition: all 0.15s;
    vertical-align: middle;
}
.cart-qty-minus {
    border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.cart-qty-plus {
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.cart-qty-btn:hover {
    background: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.cart-total-row td {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.cart-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--color-text-muted);
}

.cart-empty i {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

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

.checkout-form {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
}

.checkout-summary {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    height: fit-content;
    position: sticky;
    top: calc(var(--navbar-height) + 1rem);
}

.checkout-summary h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-border);
}

.checkout-summary-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    font-size: 0.925rem;
}

.checkout-summary-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 0.75rem;
    border-top: 2px solid var(--color-border);
    font-size: 1.2rem;
    font-weight: 700;
}

/* ============================================================
   REVIEWS / STARS
   ============================================================ */
.stars {
    color: var(--color-accent);
    font-size: 1.1rem;
    letter-spacing: 2px;
}

.stars-input {
    display: flex;
    gap: 0.25rem;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

.stars-input input {
    display: none;
}

.stars-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--color-border);
    transition: color 0.2s;
}

.stars-input label:hover,
.stars-input label:hover ~ label,
.stars-input input:checked ~ label {
    color: var(--color-accent);
}

.review-card {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 0.75rem;
}

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

.review-author {
    font-weight: 600;
    font-size: 0.9rem;
}

.review-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.review-comment {
    color: var(--color-text-light);
    font-size: 0.925rem;
    line-height: 1.5;
}

/* ============================================================
   PAGINATION
   ============================================================ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 2rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

.pagination a {
    background: var(--color-white);
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.pagination a:hover {
    background: var(--color-accent-light);
    border-color: var(--color-accent);
}

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

.pagination .disabled {
    color: var(--color-text-muted);
    pointer-events: none;
}

/* ============================================================
   PAGE HEADERS
   ============================================================ */
.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}

.page-header p {
    color: var(--color-text-light);
    margin-top: 0.25rem;
}

.section-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================================
   HERO SECTION (Homepage)
   ============================================================ */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: var(--color-white);
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
    border-radius: var(--radius-lg);
}

.hero h1 {
    font-size: 2.2rem;
    margin-bottom: 0.75rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* ============================================================
   ADMIN
   ============================================================ */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
}

.admin-sidebar {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
    height: fit-content;
}

.admin-sidebar h3 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li a {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    color: var(--color-text);
    font-size: 0.9rem;
    margin-bottom: 0.15rem;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background: var(--color-accent-light);
    color: var(--color-primary);
}

.admin-content {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 2rem;
}

/* Stats grids */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.stat-card-icon {
    font-size: 2rem;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
}

.stat-card-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
}

.stat-card-label {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Admin tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 0.75rem;
    border-bottom: 2px solid var(--color-border);
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.925rem;
}

.admin-table tr:hover td {
    background: var(--color-accent-light);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-info { background: var(--color-info-bg); color: var(--color-info); }
.badge-primary { background: #ede7f6; color: #5e35b1; }
.badge-secondary { background: #f5f5f5; color: var(--color-text-muted); }

.deleted-badge {
    background: #ffcdd2;
    color: #c62828;
}

/* ============================================================
   LOGIN / REGISTER PAGES
   ============================================================ */
.auth-page {
    max-width: 450px;
    margin: 0 auto;
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
}

.auth-page h1 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-page .form-group:last-of-type {
    margin-bottom: 1.5rem;
}

.auth-page .btn {
    width: 100%;
}

.auth-footer {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.9rem;
    color: var(--color-text-light);
}

/* ============================================================
   ORDERS LIST
   ============================================================ */
.order-card {
    background: var(--color-white);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

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

.order-number {
    font-weight: 700;
    font-size: 1rem;
}

.order-date {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.order-total {
    font-weight: 700;
    color: var(--color-primary);
}

/* ============================================================
   ERROR PAGES
   ============================================================ */
.error-page {
    text-align: center;
    padding: 4rem 1rem;
}

.error-page h1 {
    font-size: 5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.error-page p {
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: var(--color-primary-dark);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.site-footer h4 {
    color: var(--color-white);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: color 0.2s;
}

.site-footer a:hover {
    color: var(--color-accent);
}

.site-footer ul {
    list-style: none;
    padding: 0;
}

.site-footer ul li {
    margin-bottom: 0.35rem;
    font-size: 0.9rem;
}

.site-footer ul li i {
    width: 18px;
    margin-right: 0.5rem;
    color: var(--color-accent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col p {
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1.25rem;
    text-align: center;
    font-size: 0.825rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
    margin-bottom: 0.25rem;
}

/* ============================================================
   UTILITY
   ============================================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--color-text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .navbar-toggle {
        display: block;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--color-white);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 2px solid var(--color-border);
        box-shadow: var(--shadow-md);
    }

    .navbar-menu.active {
        display: flex;
    }

    .dropdown-menu {
        position: static;
        box-shadow: none;
        border: none;
        padding-left: 1rem;
    }

    .categories-bar .container {
        flex-direction: column;
    }

    .search-form input {
        width: 100%;
    }

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

    .product-detail {
        grid-template-columns: 1fr;
    }

    .product-detail-img {
        height: 300px;
    }

    .checkout-layout {
        grid-template-columns: 1fr;
    }

    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tbody tr {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.5rem;
        padding: 1rem 0;
    }

    .cart-table td {
        border: none;
        padding: 0.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 1.5rem;
    }

    .auth-page {
        padding: 1.5rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

/* ============================================================
   BACK TO TOP BUTTON
   ============================================================ */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
}
.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(0) scale(1.05);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
@media (max-width: 768px) {
    .back-to-top {
        bottom: 1.25rem;
        right: 1.25rem;
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
}

/* ============================================================
   SHARE BUTTONS (dettaglio prodotto)
   ============================================================ */
.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.9rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}
.share-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: #fff;
}
.share-btn-fb { background: #1877f2; }
.share-btn-tw { background: #0f1419; }
.share-btn-wa { background: #25d366; }

/* ============================================================
   COOKIE CONSENT BANNER
   ============================================================ */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #2d2d2d;
    color: #ddd;
    z-index: 9999;
    padding: 0.75rem 0;
    font-size: 0.875rem;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.15);
    transform: translateY(100%);
    transition: transform 0.4s ease;
}
.cookie-banner.active {
    transform: translateY(0);
}
.cookie-banner .container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.cookie-banner a {
    color: var(--color-accent);
    text-decoration: underline;
}
.cookie-btn {
    background: var(--color-accent);
    color: #333;
    border: none;
    padding: 0.4rem 1.25rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
    transition: background 0.2s;
}
.cookie-btn:hover {
    background: var(--color-accent-light);
}
@media (max-width: 600px) {
    .cookie-banner .container {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* ============================================================
   NEWSLETTER FORM (footer)
   ============================================================ */
.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}
.newsletter-form input {
    flex: 1;
    min-width: 180px;
    padding: 0.5rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    color: #fff;
    font-size: 0.9rem;
}
.newsletter-form input::placeholder {
    color: rgba(255,255,255,0.5);
}
.newsletter-form button {
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: #333;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    white-space: nowrap;
}
.newsletter-form button:hover {
    background: var(--color-accent-light);
}
.newsletter-success {
    color: var(--color-accent);
    font-size: 0.85rem;
    margin-top: 0.35rem;
    display: none;
}
