/* ====================================
   PASTICCERIA PADOVANA - RESPONSIVE STYLES (mini.css)
   ==================================== */

/* ====================================
   TABLET - max-width: 968px
   ==================================== */
@media (max-width: 968px) {

    .btn-espandi {
        margin-top: 1rem;
        width: 100%;
    }

    .header-fixed-wrapper header {
        position: relative;
        z-index: 5000; 
    }

    .header-fixed-wrapper #breadcrumb {
        position: relative;
        z-index: 1; /* Il breadcrumb deve stare sotto */
    }
    
    .header-content {
        padding: 1rem;
    }

    #logo h1 {
        font-size: 1.4rem;
    }

    #logo p {
        font-size: 0.75rem;
    }

    .header-icons a .icon-text {
        display: none;
    }

    .menu-toggle {
        display: block;
        z-index: 1000;
    }

    nav#menu {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 400px;
        height: 100vh;
        background: white;
        visibility: hidden;
        transition: left 0.3s ease, visibility 0s linear 0.3s;
        padding: 6rem 2rem 2rem;
        box-shadow: 2px 0 20px var(--shadow);
        overflow-y: auto;
        z-index: 3000;
    }

    nav#menu.active {
        left: 0;
        border-right: 1px solid var(--primary);
        visibility: visible;
        transition: left 0.3s ease, visibility 0s linear 0s;
    }

        .header-content > .header-icons {
        display: none !important;
    }

    .menu-icons-mobile {
        display: block;
        margin-top: 2rem;
        padding-top: 1rem;
        border-top: 1px solid #ddd;
    }

    .mobile-actions {
        display: flex;
        justify-content: center;
        gap: 2rem;
    }

    .mobile-actions .icon-btn svg {
        width: 32px;
        height: 32px;
    }
    
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    nav#menu ul {
        flex-direction: column;
        gap: 2rem;
    }

    nav#menu a,
    nav#menu li,
    nav#menu span {
        font-size: 1.2rem;
    }

    /* HOMEPAGE - HERO */
    .hero {
        margin-top: 0;
        height: auto;
        min-height: auto;
        padding: 3rem 0;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .hero-text h2 {
        font-size: 2.5rem;
    }

    .hero-text p {
        font-size: 1.1rem;
    }

    .hero-image {
        order: -1;
    }

    .header-icons a .icon-text {
        display: none;
    }

    /* HOMEPAGE - FAMOUS SWEETS */
    .famous-sweets {
        padding: 3rem 1rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .sweets-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sweet-card {
        padding: 1.5rem;
    }

    /* CHI SIAMO */
    .page-hero h2 {
        font-size: 2.5rem;
    }

    .page-hero p {
        font-size: 1.1rem;
    }

    .content-wrapper {
        padding: 2rem 1rem;
    }

    section h2, section h3 {
        font-size: 2rem;
    }

    .values-list {
        grid-template-columns: 1fr;
    }

    .griglia-team {
        grid-template-columns: 1fr;
    }

    /* CONTATTACI */
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 0 1rem;
    }

    .contact-info,
    .form-container {
        padding: 2rem;
        margin-top: 1.5rem;
    }

    .contact-info h2,
    .form-container legend {
        font-size: 2rem;
    }

    /* LOGIN / REGISTER */
    .login-container,
    .register-container {
        padding: 2rem;
    }

    .login-container legend,
    .register-container legend {
        font-size: 2rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    /* PRODUCT DETAILS */
    .product-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        width: 100%;
    }

    .product-image {
        position: static;
    }

    .product-details {
        padding: 2rem;
    }

    .product-details h1 {
        font-size: 2.2rem;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    /* CATALOG */
    .page-title h1 {
        font-size: 2.5rem;
    }

    #grigliaTorte {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
        padding: 0 1rem;
    }

    /*-----------------------------------------------------------------*/
    /* AGGIUNGI PRODOTTO*/
    #formAggiungiProdotto fieldset {
        grid-template-columns: 1fr;
    }

    #formAggiungiProdotto button {
        grid-column: 1;
    }

    .admin-content-grid {
        grid-template-columns: 1fr;
    }

    #formAggiungiProdotto .campoDati:nth-of-type(1), /* Tipo */
    #formAggiungiProdotto .campoDati:nth-of-type(2), /* Nome */
    #formAggiungiProdotto .campoDati:nth-of-type(3), /* Descrizione */
    #formAggiungiProdotto .campoDati:nth-of-type(4), /* Prezzo */
    #formAggiungiProdotto .campoDati:nth-of-type(5), /* Immagine */
    #formAggiungiProdotto .campoDati:nth-of-type(6)  /* Allergeni */
    {
        grid-column: 1;
    }
    /*-----------------------------------------------------------------*/
    /*Area personale amministratore*/
    .admin-content-grid {
        display: block; /* colonna unica */
        padding: 1rem;
    }

    .form-section, .products-list-section {
        padding: 1rem;
    }

    .btn-submit {
        width: 100%; /* pulsante full-width su mobile */
    }
    .admin-content-grid {
        grid-template-columns: 1fr !important; /* tutto in colonna */
    }
    /*-----------------------------------------------------------------*/
    /* Ordini Admin */
    main {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 2.5rem;
    }

    caption {
        font-size: 1.4rem;
        padding: 1.5rem;
    }

    .caption-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .aggiorna-tabella {
        align-self: flex-end;
    }

    thead {
        display: none;
    }

    tbody tr {
        display: block;
        margin-bottom: 1.5rem;
        border: 2px solid #E5E5E5;
        border-radius: 15px;
        overflow: hidden;
    }

    tbody tr:hover {
        border-color: var(--primary);
    }

    tbody th,
    tbody td {
        display: block;
        text-align: left;
        padding: 1rem 1.5rem;
    }

    tbody th {
        background: var(--primary);
        color: white;
        font-size: 1.2rem;
    }

    tbody td::before {
        content: attr(data-title) ":";
        font-weight: 700;
        color: var(--primary);
        display: inline-block;
        margin-right: 0.5rem;
    }

    tbody td:not(:last-child) {
        border-bottom: 1px solid #E5E5E5;
    }

    table td::before {
        content: attr(data-label) ":";
    }

    table td[data-label="Azioni"]::before,
    table td[data-label="Stato"]::before {
        content: none;
    }

    /* USER AREA */
    .user-area-content {
        padding: 2rem 1rem;
    }

    .user-welcome {
        padding: 3rem 1.5rem;
    }

    .user-welcome h2 {
        font-size: 2rem;
    }

    .welcome-icon {
        width: 80px;
        height: 80px;
    }

    .welcome-icon svg {
        width: 48px;
        height: 48px;
    }

    /* PERSONAL AREA */
    .personal-area-container {
        padding: 2rem 1rem;
    }

    .personal-area-header {
        flex-direction: column;
        gap: 1.5rem;
        padding: 2rem;
    }

    .welcome-section {
        flex-direction: column;
        text-align: center;
    }

    .welcome-text h2 {
        font-size: 1.8rem;
    }

    .btn-logout {
        width: 100%;
        justify-content: center;
    }

    .personal-area-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .profile-card,
    .orders-card {
        padding: 1.5rem;
    }

    .card-header h3 {
        font-size: 1.5rem;
    }

    /* ERROR PAGE */
    .error-page-container {
        padding: 3rem 1.5rem;
    }

    .error-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2.5rem 2rem;
        text-align: center;
    }

    .error-image img {
        max-width: 300px;
    }

    .error-code {
        font-size: 6rem;
    }

    .error-text h1 {
        font-size: 2rem;
    }

    .error-message {
        font-size: 1.1rem;
    }

    .error-suggestion {
        font-size: 1rem;
    }

    .error-actions {
        flex-direction: column;
    }

    .error-contact {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    /* FOOTER */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* ====================================
   MOBILE - max-width: 480px
   ==================================== */
@media (max-width: 480px) {

    .product-detail-container {
        padding: 1rem;
    }

    .infoItem,
    .product-form-section {
        padding: 1.5rem;
    }

    .infoItem h2 {
        font-size: 1.8rem;
    }

    .prezzoItem {
        font-size: 1.6rem;
    }

    .acquistoItem legend {
        font-size: 1.2rem;
    }

    .acquistoItem button[type="submit"] {
        font-size: 1.1rem;
        padding: 1.1rem 1.5rem;
    }
    /* HEADER */
    #logo h1 {
        font-size: 1.2rem;
    }

    #logo p {
        display: none;
    }

    .icon-btn svg {
        width: 24px;
        height: 24px;
    }

    /* HOMEPAGE - HERO */
    .hero-text h2 {
        font-size: 2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    /* CHI SIAMO */
    .page-hero {
        padding: 3rem 1rem;
    }

    .page-hero h2 {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.8rem;
    }

    aside {
        padding: 2rem;
    }

    /* CONTATTACI */
    main {
        padding: 2rem 1rem;
    }

    .contact-info,
    .form-container {
        padding: 1.5rem;
    }

    .contact-info h2,
    .form-container legend {
        font-size: 1.8rem;
    }

    /* LOGIN / REGISTER */
    .login-container,
    .register-container {
        padding: 1.5rem;
    }

    .login-container legend,
    .register-container legend {
        font-size: 1.8rem;
    }

    /* PRODUCT DETAILS */
    .product-details {
        padding: 1.5rem;
    }

    .product-details h1 {
        font-size: 1.8rem;
    }

    .product-price {
        font-size: 1.5rem;
    }

    /* CATALOG */
    .page-title h1 {
        font-size: 2rem;
    }

    #grigliaTorte {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }

    /* ORDINI ADMIN */
    .page-header h1 {
        font-size: 2rem;
    }

    .stato-ordine {
        flex-direction: column;
        gap: 0.8rem;
    }

    .stato-ordine select {
        width: 100%;
    }

    /* PERSONAL AREA */
    .personal-area-header {
        padding: 1.5rem;
    }

    .welcome-avatar {
        width: 64px;
        height: 64px;
    }

    .welcome-avatar svg {
        width: 36px;
        height: 36px;
    }
}
 @media (max-width: 800px){
    .welcome-text h2 {
        font-size: 1.6rem;
    }

    .profile-card,
    .orders-card {
        padding: 1.2rem;
    }

    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .card-header h3 {
        font-size: 1.4rem;
    }

    .danger-zone {
        padding: 1.5rem;
    }

    .danger-header {
        flex-direction: column;
        align-items: flex-start;
    }

    /* ERROR PAGE */
    .error-page-container {
        padding: 2rem 1rem;
    }

    .error-content {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .error-image img {
        max-width: 250px;
    }

    .error-code {
        font-size: 4.5rem;
        margin-bottom: 0;
    }

    .error-text h1 {
        font-size: 1.6rem;
    }

    .error-message,
    .error-suggestion {
        font-size: 1rem;
    }

    .btn-primary-error,
    .btn-secondary-error {
        padding: 1rem 1.5rem;
        font-size: 0.95rem;
    }

    .welcome-icon svg {
        width: 48px;
        height: 48px;
    }
 }   
