/* Order page specific styles */
.order-page {
    padding: 3rem 0 4rem;
    background: var(--color-background);
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 2rem;
    color: var(--color-text);
    font-weight: 100;
    text-align: center;
}

.order-grid {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 2rem;
    align-items: start;
}

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

.products-grid--single {
    grid-template-columns: 1fr;
    max-width: 500px;
    margin: 0 auto;
}

.product-card {
    background: white;
    border-radius: 1.5rem;
    padding: 0.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.3s ease;
}

.product-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.product-card__content {
    display: flex;
    flex-direction: column;
}

.product-card__image {
    margin: 0;
    padding: 0;
    line-height: 0;
}

.product-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.product-card__info {
    flex: 1;
    min-width: 0;
    padding: 1rem;
}

.product-card__title {
    font-size: 1.25rem;
    text-align: left;
    font-weight: 500;
    text-align: left;
    padding: 0;
}

.product-card__description {
    color: var(--color-text-light);
    font-size: 0.9rem;
    margin: 0;
}

.product-card__price {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--color-text);
    white-space: nowrap;
    padding: 1rem;
    align-self: center;
}

.product-card__controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.button--add {
    flex: 1;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    height: 48px;
}

.quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex: 1;
    height: 48px;
}

.button--quantity {
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 1.25rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

.button--quantity:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
}

.quantity-display {
    min-width: 24px;
    text-align: center;
    font-weight: 500;
    color: var(--color-text);
    font-size: 1.1rem;
}

/* Remove selection overlay */
* {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Order summary */
.order-summary {
    position: sticky;
    top: 100px;
}

.order-summary__content {
    background: white;
    border-radius: 1.5rem;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.order-items {
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 100px;
}

.order-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-light);
}

.order-empty p {
    margin: 0;
    font-size: 1.1rem;
}

.order-empty__subtitle {
    font-size: 0.9rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.order-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.order-item__info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.order-item__name {
    font-weight: 500;
    color: var(--color-text);
}

.order-item__quantity {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.order-item__price {
    font-weight: 600;
    color: var(--color-text);
}

.order-item:last-child {
    border-bottom: none;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    margin: 1rem 0;
    border-top: 2px solid rgba(0, 0, 0, 0.1);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text);
}

.order-macaron-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--color-text-light);
}

.order-macaron-count span:last-child {
    font-weight: 600;
    color: var(--color-text);
}

/* Form styles */
.order-form {
    margin-top: 2rem;
}

.payment-info {
    text-align: center;
    padding-bottom: 0.5rem;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--color-text);
    font-weight: 500;
}

.form-group label::after {
    content: " *";
    color: var(--color-primary);
}

.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.75rem;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Button styles */
.button--add:hover {
    background: var(--color-primary-light);
    transform: translateY(-2px);
}

.button--submit {
    width: 100%;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 9999px;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button--submit:hover:not(:disabled) {
    background: var(--color-primary-light);
    transform: translateY(-2px);
}

.button--submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.button--outline {
    background: white;
    color: var(--color-primary);
    border: 1px solid var(--color-primary);
    border-radius: 9999px;
    padding: 0.4rem 1.5rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.button--outline:hover {
    background: var(--color-primary);
    color: white;
}

/* Header small variant */
.header--small {
    padding: 0.5rem 0;
}

.header--small .logo img {
    width: 80px;
    height: 80px;
}

/* Responsive design */
@media (max-width: 1024px) {
    .order-grid {
        grid-template-columns: 1fr;
    }

    .order-summary {
        position: static;
    }
}

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

/* View transition styles */
::view-transition-old(root),
::view-transition-new(root) {
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-old(root) {
    z-index: 1;
}

::view-transition-new(root) {
    z-index: 2;
}

.dark::view-transition-old(root) {
    z-index: 2;
}

.dark::view-transition-new(root) {
    z-index: 1;
}
