/* ioColleziono.it - Main Stylesheet */
/* Mobile-first minimal design */

:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --accent-color: #e74c3c;
    --text-color: #333;
    --light-gray: #ecf0f1;
    --border-color: #ddd;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --white: #fff;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-size: 16px;
    background: var(--white);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-decoration: none;
}

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

.main-nav {
    display: none;
    width: 100%;
    margin-top: 1rem;
}

.main-nav.active {
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.main-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 0.5rem;
    display: block;
    transition: var(--transition);
}

.main-nav a:hover {
    background: rgba(255,255,255,0.1);
}

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

.cart-icon {
    position: relative;
    color: var(--white);
    font-size: 1.3rem;
    text-decoration: none;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--accent-color);
    color: var(--white);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Search Bar */
.search-bar {
    background: var(--white);
    padding: 1rem 0;
    box-shadow: var(--shadow);
}

.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-form input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
}

.search-form button:hover {
    background: #2980b9;
}

/* Categories */
.categories {
    padding: 2rem 0;
}

.categories h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

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

.category-card {
    background: var(--light-gray);
    padding: 1.5rem;
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

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

.category-card h3 {
    font-size: 1rem;
    margin-top: 0.5rem;
}

/* Products */
.products {
    padding: 2rem 0;
}

.products h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

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

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    background: var(--light-gray);
}

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

.product-title {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.product-title:hover {
    color: var(--secondary-color);
}

.product-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

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

.compare-price {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.5rem;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

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

.btn-primary:hover {
    background: #2980b9;
}

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

.btn-success:hover {
    background: #229954;
}

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

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

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

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* Cart */
.cart-page {
    padding: 2rem 0;
    min-height: 60vh;
}

.cart-items {
    margin-bottom: 2rem;
}

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

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
}

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

.cart-item-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.cart-item-variant {
    font-size: 0.9rem;
    color: #666;
}

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

.quantity-btn {
    background: var(--light-gray);
    border: none;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1.1rem;
}

.quantity-input {
    width: 50px;
    text-align: center;
    padding: 0.25rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
}

.cart-item-price {
    font-weight: 700;
    font-size: 1.1rem;
}

.cart-summary {
    background: var(--light-gray);
    padding: 1.5rem;
    border-radius: 8px;
    position: sticky;
    top: 80px;
}

.cart-summary-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

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

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

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

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
}

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

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 0 1rem;
    margin-top: 3rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-section a:hover {
    opacity: 1;
}

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

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-gray);
    border-top-color: var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive */
@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }
    
    .main-nav {
        display: block;
        width: auto;
        margin-top: 0;
    }
    
    .main-nav ul {
        flex-direction: row;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .cart-item {
        flex-direction: row;
    }
    
    .cart-item-image {
        width: 120px;
        height: 120px;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .product-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

/* Admin Styles */
.admin-header {
    background: #34495e;
}

.admin-sidebar {
    background: var(--primary-color);
    min-height: calc(100vh - 60px);
    padding: 1rem;
}

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

.admin-sidebar a {
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem;
    display: block;
    margin-bottom: 0.5rem;
    border-radius: 4px;
    transition: var(--transition);
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(255,255,255,0.1);
}

.admin-content {
    padding: 2rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    box-shadow: var(--shadow);
    border-radius: 8px;
    overflow: hidden;
}

.data-table th {
    background: var(--primary-color);
    color: var(--white);
    padding: 1rem;
    text-align: left;
}

.data-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-color);
}

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

.data-table tr:hover {
    background: var(--light-gray);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
}

.badge-success {
    background: var(--success-color);
    color: var(--white);
}

.badge-warning {
    background: var(--warning-color);
    color: var(--white);
}

.badge-danger {
    background: var(--accent-color);
    color: var(--white);
}

.badge-info {
    background: var(--secondary-color);
    color: var(--white);
}



.footer{
  background:#232f3e;
  color:#fff;
  padding: 36px 0 18px;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.footer .container{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 16px;
}

.footer-content{
  display:grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255,255,255,.15);
}

.footer-section h3{
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 10px;
  letter-spacing: .2px;
}

.footer-section p{
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255,255,255,.9);
}

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

.footer-section li{
  margin: 8px 0;
}

.footer-section a{
  color: rgba(255,255,255,.85);
  text-decoration: none;
  font-size: 13px;
}

.footer-section a:hover{
  color: #fff;
  text-decoration: underline;
}

.footer-bottom{
  padding-top: 14px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  text-align: center;
}

.footer-bottom a{
  color: rgba(255,255,255,.85);
  text-decoration: none;
}
.footer-bottom a:hover{
  text-decoration: underline;
}

/* Mobile: una colonna (Amazon-like) */
@media (max-width: 900px){
  .footer-content{
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .footer-section{
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,.10);
  }
  .footer-section:last-child{
    border-bottom: none;
  }
}


.category-nav {
    border-top: 1px solid #eee;
    background: #fafafa;
}

.category-nav ul {
    display: flex;
    gap: 20px;
    padding: 10px 0;
    margin: 0;
    list-style: none;
    justify-content: center;
    flex-wrap: wrap;
}

.category-nav a {
    text-decoration: none;
    font-size: 0.95rem;
    color: #444;
    font-weight: 500;
}

.category-nav a:hover {
    color: #000;
    text-decoration: underline;
}

 