/* Reset e base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Mobile Header */
.mobile-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.mobile-header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.mobile-header nav {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.5rem 0;
}

.mobile-header nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    white-space: nowrap;
    background-color: rgba(255,255,255,0.1);
    margin: 0.2rem;
}

.mobile-header nav a:hover {
    background-color: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* Header */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.logo i {
    margin-right: 10px;
    color: #ffd700;
}

.nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 5px;
}

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

.admin-link {
    background-color: #dc3545 !important;
    color: white !important;
}

.admin-link:hover {
    background-color: #c82333 !important;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), 
                url('https://images.unsplash.com/photo-1441986300917-64674bd600d8?ixlib=rb-4.0.3') center/cover;
    color: white;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 3rem;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

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

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #333;
}

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

.product-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-info {
    padding: 1.5rem;
}

.product-info h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.price-info {
    margin-bottom: 1rem;
}

.price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #667eea;
}

.shipping {
    font-size: 0.9rem;
    color: #666;
    margin-left: 0.5rem;
}

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

.product-actions .btn {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: #333;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

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

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

.footer-section p {
    margin-bottom: 0.5rem;
}

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

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
    
    .hero-content h2 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .product-actions {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

/* Form Styles */
.form-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

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

/* Alert Messages */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
}

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

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

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Loading Spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chat Styles */
.chat-container {
    max-width: 800px;
    margin: 2rem auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
}

.chat-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    text-align: center;
}

.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 1rem;
    background: #f8f9fa;
}

.message {
    margin-bottom: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    max-width: 70%;
}

.message.user {
    background: #667eea;
    color: white;
    margin-left: auto;
}

.message.other {
    background: white;
    border: 1px solid #ddd;
}

.chat-input {
    padding: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 0.5rem;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.chat-input button {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

/* Chat Private Styles */
.message .message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.message .message-header strong {
    color: #333;
}

.message .message-header small {
    color: #666;
    font-size: 0.8rem;
}

.message .message-content {
    line-height: 1.4;
}

.delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 2px 5px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.delete-btn:hover {
    background-color: #dc3545;
    color: white;
}

.admin-badge {
    background: #ffd700;
    color: #333;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.5rem;
}

/* Profile Styles */
.profile-info {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1rem;
}

.profile-info h3 {
    margin-bottom: 1rem;
    color: #333;
}

.profile-info div {
    margin-bottom: 0.5rem;
}

.profile-info strong {
    color: #667eea;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .chat-container {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .chat-messages {
        height: 300px;
    }
    
    .message {
        max-width: 85%;
    }
    
    .form-container {
        margin: 1rem;
        padding: 1.5rem;
    }
}

/* Video Chat Styles */
.video-controls {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    flex-wrap: wrap;
    justify-content: center;
}

.video-controls .btn {
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

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

.video-container {
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16/9;
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-label {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 10;
}

.connection-status {
    margin: 1rem 0;
    padding: 1rem;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
}

.connection-status.connected {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.connection-status.connecting {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.connection-status.disconnected {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.video-chat-messages {
    height: 200px;
    overflow-y: auto;
    margin: 1rem 0;
    padding: 1rem;
    background: white;
    border-radius: 5px;
    border: 1px solid #ddd;
}

.video-chat-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.video-chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.video-chat-input button {
    padding: 10px 15px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.video-chat-input button:hover {
    background: #5a6fd8;
}

/* Responsive video chat */
@media (max-width: 768px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
    
    .video-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .video-controls .btn {
        width: 100%;
        max-width: 200px;
    }
    
    .video-chat-messages {
        height: 150px;
    }
} 

/* ===== CART STYLES ===== */

.cart-icon {
    position: relative;
    display: inline-block;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.cart-sidebar {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    z-index: 1001;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.cart-sidebar.active {
    right: 0;
}

.cart-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

.cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    border-bottom: 1px solid #eee;
    background: #f8f9fa;
}

.close-cart {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
}

.cart-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: #666;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.cart-empty i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.cart-empty p {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

.cart-items {
    padding: 1rem;
}

.cart-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #eee;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
}

.cart-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.cart-item-image .no-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

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

.cart-item-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
}

.cart-item-details .price {
    font-weight: bold;
    color: #667eea;
    margin: 0 0 0.5rem 0;
}

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

.quantity-controls input {
    width: 60px;
    padding: 5px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-align: center;
}

.remove-item {
    color: #dc3545;
    text-decoration: none;
    padding: 5px;
}

.cart-actions {
    padding: 1rem;
    border-top: 1px solid #eee;
}

.cart-total {
    padding: 1rem;
    background: #f8f9fa;
    border-top: 1px solid #eee;
}

.cart-total > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.cart-total .total {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: 1px solid #ddd;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
}

.cart-checkout {
    padding: 1rem;
    border-top: 1px solid #eee;
}

/* ===== CHECKOUT STYLES ===== */

.checkout-form .form-group {
    margin-bottom: 1rem;
}

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

.checkout-form input,
.checkout-form select,
.checkout-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.checkout-form input:focus,
.checkout-form select:focus,
.checkout-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* ===== PRODUCT PAGE STYLES ===== */

.quantity-selector {
    margin-bottom: 1rem;
}

.quantity-selector label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.quantity-selector select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.add-to-cart-form {
    margin-top: 1rem;
}

/* ===== ORDER CONFIRMATION STYLES ===== */

.order-confirmation {
    text-align: center;
    padding: 2rem;
}

.order-confirmation i {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1rem;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 768px) {
    .cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .checkout-form {
        grid-template-columns: 1fr;
    }
    
    .order-summary {
        order: -1;
    }
}

/* ===== ENHANCED BUTTON STYLES ===== */

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

.btn-secondary {
    background: #6c757d;
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background: #5a6268;
}

/* ===== FEATURES SECTION ===== */

.features-section {
    background: #f8f9fa;
    padding: 4rem 0;
}

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

.feature {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.feature i {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 1rem;
}

.feature h3 {
    margin-bottom: 1rem;
    color: #333;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* ===== NO PRODUCTS STYLES ===== */

.no-products {
    text-align: center;
    padding: 4rem 2rem;
    color: #666;
}

.no-products i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.no-products h3 {
    margin-bottom: 1rem;
    color: #333;
}

/* ===== PRODUCTS SECTION UPDATE ===== */

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

.products-section h2 {
    text-align: center;
    margin-bottom: 3rem;
    color: #333;
}

.products-section h2 i {
    color: #667eea;
    margin-right: 0.5rem;
}

.product-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.product-details {
    margin-bottom: 1rem;
}

.product-details .price {
    font-size: 1.2rem;
    font-weight: bold;
    color: #667eea;
    margin-right: 1rem;
}

.product-details .shipping {
    color: #666;
    font-size: 0.9rem;
} 

/* --- OTTIMIZZAZIONE MOBILE DEDICATA --- */
@media (max-width: 600px) {
    body {
        font-size: 1.15rem;
        padding: 0;
        background: #f8f9fa;
    }
    .container {
        max-width: 100vw;
        padding: 0 8px;
    }
    .mobile-header {
        font-size: 1.3rem;
        padding: 1.2rem 0;
    }
    .mobile-content {
        padding: 1.2rem 0.5rem;
    }
    .mobile-btn {
        font-size: 1.1rem;
        padding: 1.1rem 0.5rem;
        margin: 0.7rem 0;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(40,167,69,0.08);
    }
    h1, h2, h3 {
        font-size: 1.3em;
    }
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 1rem;
    }
    .footer-section {
        margin-bottom: 1.2rem;
    }
    .footer-bottom {
        font-size: 0.95em;
        padding-top: 1.2rem;
    }
    img, .product-image img, .cart-item-image img {
        max-width: 100%;
        height: auto;
    }
    .btn, .btn-large, .btn-primary, .btn-secondary {
        width: 100%;
        font-size: 1.1rem;
        padding: 1rem 0;
        margin-bottom: 0.7rem;
    }
    .products-grid, .features-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    .product-card, .feature {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    }
    .cart-sidebar {
        width: 100vw;
        right: 0;
        left: 0;
        border-radius: 0;
    }
    .cart-header, .cart-total, .cart-checkout {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    .cart-item-details h4 {
        font-size: 1.1rem;
    }
    .cart-item-details .price {
        font-size: 1rem;
    }
    .quantity-controls input {
        width: 48px;
        font-size: 1rem;
    }
    .order-summary, .checkout-form {
        padding: 0.5rem;
    }
    .form-container {
        padding: 1rem;
        border-radius: 10px;
    }
    .alert {
        font-size: 1rem;
        padding: 0.7rem 1rem;
    }
} 