/**
 * Responsive CSS adjustments for Petal Pavilion
 * Contains media queries for responsive layouts
 */

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }

    /* Adjust card grid on product listings */
    .product-card-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Medium devices (tablets, less than 992px) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }

    /* Adjust product grid */
    .product-card-container {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Cart adjustments */
    .cart-container {
        grid-template-columns: 1fr;
    }

    .cart-summary {
        margin-top: 2rem;
    }

    /* Order details */
    .order-details-grid {
        grid-template-columns: 1fr;
    }

    /* Admin dashboard */
    .stats-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Small devices (landscape phones, less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
    }

    /* Header/navbar adjustments */
    .navbar-brand-custom {
        font-size: 1.2rem;
    }

    /* Product card adjustments */
    .product-card-container {
        grid-template-columns: 1fr;
    }

    /* Tables become scrollable */
    .table-responsive {
        overflow-x: auto;
    }

    /* Form layout changes */
    .form-group-inline {
        flex-direction: column;
    }

    /* Cart item layout */
    .cart-item {
        grid-template-columns: 80px 1fr;
        grid-template-rows: auto auto;
    }

    .item-image {
        grid-row: span 2;
    }

    .item-subtotal {
        grid-column: 2;
        align-items: flex-start;
        margin-top: 1rem;
    }

    /* Admin dashboard */
    .stats-cards {
        grid-template-columns: 1fr;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    /* Container takes full width with padding */
    .container {
        width: 100%;
        padding-right: 15px;
        padding-left: 15px;
        margin-right: auto;
        margin-left: auto;
    }

    /* Button groups stack vertically */
    .btn-group {
        display: flex;
        flex-direction: column;
    }

    .btn-group .btn {
        margin-bottom: 0.5rem;
    }

    /* Form controls take full width */
    .form-control {
        width: 100%;
    }

    /* Cart item adjustments */
    .cart-item {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
    }

    .item-image {
        grid-row: 1;
        justify-content: center;
        margin-bottom: 1rem;
    }

    .item-details {
        grid-row: 2;
        text-align: center;
    }

    .item-subtotal {
        grid-column: 1;
        grid-row: 3;
        align-items: center;
        margin-top: 1rem;
    }

    /* Hide some table columns on mobile */
    .table-responsive th:nth-child(3),
    .table-responsive td:nth-child(3),
    .table-responsive th:nth-child(4),
    .table-responsive td:nth-child(4) {
        display: none;
    }
}