/*
 * Public shop pages
 * Visual style aligned with landing page (green palette, bright surface).
 */

:root {
    --shop-primary: #16a34a;
    --shop-primary-dark: #15803d;
    --shop-secondary: #f59e0b;
    --shop-bg-soft: #ecfdf5;
    --shop-border: #d1fae5;
    --shop-text: #1f2937;
    --shop-muted: #6b7280;
    --shop-white: #ffffff;
}

.shop-body {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 45%, #ffffff 100%);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--shop-text);
}

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

.shop-header {
    position: sticky;
    top: 0;
    z-index: 500;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--shop-border);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.shop-header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.shop-brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: inherit;
}

.shop-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.shop-brand-text strong {
    display: block;
    font-size: 16px;
    line-height: 1.2;
    color: var(--shop-primary-dark);
}

.shop-brand-text span {
    display: block;
    font-size: 12px;
    color: var(--shop-muted);
}

.shop-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.shop-nav-link {
    font-weight: 600;
    color: #374151;
    font-size: 14px;
    padding: 8px 10px;
    border-radius: 8px;
}

.shop-nav-link.active,
.shop-nav-link:hover {
    color: var(--shop-primary-dark);
    background: #f0fdf4;
}

.shop-user-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 999px;
    background: #dcfce7;
    color: var(--shop-primary-dark);
    border: 1px solid #86efac;
}

.shop-mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 22px;
    color: var(--shop-primary-dark);
    cursor: pointer;
}

.shop-cart-count {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    padding: 0 6px;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-dark));
    color: #fff;
    font-size: 11px;
}

.floating-cart-button {
    position: fixed;
    right: 20px;
    bottom: 22px;
    width: 58px;
    height: 58px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--shop-primary), var(--shop-primary-dark));
    color: #fff;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.35);
    z-index: 1200;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-cart-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 28px rgba(22, 163, 74, 0.42);
}

.floating-cart-button i {
    font-size: 22px;
}

.floating-cart-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 6px;
    background: #f59e0b;
    color: #111827;
    font-weight: 700;
    font-size: 11px;
    border: 2px solid #fff;
}

.floating-cart-badge.is-empty {
    opacity: 0.8;
}

.shop-main {
    flex: 1;
    padding: 34px 0 44px;
}

.shop-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.shop-page-head h1 {
    margin: 0 0 8px;
    font-size: 30px;
}

.shop-page-head p {
    color: var(--shop-muted);
}

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.shop-product-card {
    background: var(--shop-white);
    border-radius: 16px;
    border: 1px solid #dcfce7;
    box-shadow: 0 6px 24px rgba(22, 163, 74, 0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.shop-product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.12);
}

.shop-product-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
}

.shop-product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-product-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.shop-product-body h3 {
    margin: 0;
    font-size: 17px;
}

.shop-product-body p {
    margin: 0;
    font-size: 13px;
    color: var(--shop-muted);
    min-height: 40px;
}

.shop-product-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.shop-product-meta strong {
    color: var(--shop-primary-dark);
    font-size: 18px;
}

.shop-product-form {
    display: flex;
    gap: 10px;
}

.shop-checkout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr);
    gap: 20px;
    align-items: start;
}

.shop-cart-item {
    margin-bottom: 14px;
    border: 1px solid #dcfce7;
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.05);
}

.shop-cart-item-head {
    display: grid;
    grid-template-columns: 90px 1fr;
    gap: 12px;
    margin-bottom: 10px;
}

.shop-cart-item-media {
    width: 90px;
    height: 90px;
    border-radius: 10px;
    overflow: hidden;
    background: #f0fdf4;
}

.shop-cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-cart-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.shop-cart-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.shop-inline-form {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.shop-inline-form label {
    font-size: 13px;
    color: var(--shop-muted);
}

.shop-inline-form .form-control {
    width: 88px;
    padding: 8px 10px;
}

.shop-cart-subtotal {
    margin-top: 10px;
    font-size: 15px;
}

.shop-summary {
    border: 1px solid #bbf7d0;
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.09);
}

.shop-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    border-bottom: 1px solid #dcfce7;
}

.shop-summary-line:last-of-type {
    border-bottom: none;
}

.shop-checkout-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    gap: 10px;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #dcfce7;
}

.shop-checkout-item-media {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    background: #f0fdf4;
}

.shop-checkout-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.shop-checkout-item-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 12px;
    color: var(--shop-muted);
}

.shop-checkout-item-info strong {
    color: var(--shop-text);
    font-size: 13px;
}

.shop-readonly-block {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.shop-readonly-block div {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    padding: 10px 12px;
}

.shop-readonly-block small {
    display: block;
    color: var(--shop-muted);
    font-size: 12px;
    margin-bottom: 4px;
}

.shop-readonly-block strong {
    font-size: 14px;
}

.shop-note {
    font-size: 12px;
    color: var(--shop-muted);
}

.shop-auth-wrap {
    min-height: calc(100vh - 210px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-auth-card {
    width: 100%;
    max-width: 470px;
    border: 1px solid #bbf7d0;
    box-shadow: 0 14px 30px rgba(22, 163, 74, 0.12);
}

.shop-auth-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 28px;
}

.shop-auth-subtitle {
    text-align: center;
    margin-bottom: 20px;
    color: var(--shop-muted);
}

.shop-auth-switch {
    text-align: center;
    font-size: 14px;
    margin-top: 16px;
    color: var(--shop-muted);
}

.shop-auth-switch a {
    font-weight: 600;
    color: var(--shop-primary-dark);
}

.shop-footer {
    padding: 18px 0;
    border-top: 1px solid #dcfce7;
    background: #ffffff;
}

.shop-footer p {
    color: var(--shop-muted);
    font-size: 13px;
    text-align: center;
}

@media (max-width: 992px) {
    .shop-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-checkout-grid {
        grid-template-columns: 1fr;
    }

    .shop-mobile-menu-btn {
        display: block;
    }

    .shop-nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        background: #ffffff;
        padding: 14px 20px;
        border-top: 1px solid #dcfce7;
        box-shadow: 0 10px 22px rgba(0, 0, 0, 0.08);
        gap: 10px;
    }

    .shop-nav.active {
        display: flex;
        flex-direction: column;
        align-items: stretch;
    }

    .shop-nav .btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    .shop-page-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .shop-product-grid {
        grid-template-columns: 1fr;
    }

    .shop-product-form {
        width: 100%;
    }

    .shop-cart-item-head {
        grid-template-columns: 72px 1fr;
    }

    .shop-cart-item-media {
        width: 72px;
        height: 72px;
    }

    .shop-readonly-block {
        grid-template-columns: 1fr;
    }

    .floating-cart-button {
        width: 54px;
        height: 54px;
        right: 14px;
        bottom: 16px;
    }
}
