/* ==========================================================================
   DLG (Dieline Genius) — Portal-specific styles
   Extends shared/static/css/common.css
   ========================================================================== */

/* ---------- Hero ---------- */

.hero {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--gray-900) 0%, #1e293b 100%);
    color: var(--white);
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
}

.hero h1 {
    color: var(--white);
    font-size: 2.4rem;
    margin-bottom: 0.5rem;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--gray-300);
    max-width: 700px;
    margin: 0 auto 1.5rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ---------- Landing sections ---------- */

.landing-section {
    margin-bottom: 3rem;
}

.landing-section h2 {
    text-align: center;
    margin-bottom: 1.5rem;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.5rem;
}

.step-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--brand);
    color: var(--white);
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
}

/* ---------- Group grid ---------- */

.group-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.group-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.group-thumb {
    width: 100%;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    overflow: hidden;
}

.group-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.group-card:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.group-card h2,
.group-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1rem;
    color: var(--gray-900);
}

.group-card > h3 {
    padding: 0.75rem 1rem 0;
}

.group-code {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    margin-bottom: 0.25rem;
}

.group-count {
    font-size: 0.85rem;
    color: var(--gray-500);
    padding: 0 1rem 0.75rem;
    display: block;
}

/* ---------- Item grid ---------- */

.item-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.25rem;
}

.item-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    text-decoration: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.item-card:hover {
    border-color: var(--brand);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.item-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-100);
    overflow: hidden;
}

.item-image img {
    max-height: 100%;
    object-fit: contain;
}

.item-no-image {
    color: var(--gray-500);
    font-size: 0.85rem;
}

.item-info {
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-info h3 {
    margin: 0;
    font-size: 0.9rem;
}

.item-price {
    font-weight: 600;
    color: var(--brand);
    white-space: nowrap;
}

/* ---------- Design detail ---------- */

.design-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

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

.design-images {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.design-img-main,
.design-img-alt {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    background: var(--white);
}

.design-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--brand);
    margin: 0.5rem 0 1rem;
}

.design-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

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

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 2px rgba(150, 28, 31, 0.15);
}

.unit-toggle {
    display: flex;
    gap: 1.5rem;
}

.unit-option {
    font-weight: normal;
    cursor: pointer;
}

.param-input-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.param-input {
    width: auto;
    flex: 1;
}

.param-unit {
    font-size: 0.85rem;
    color: var(--gray-500);
    min-width: 2em;
}

.param-range,
.param-hint {
    color: var(--gray-500);
    font-size: 0.8rem;
}

.param-hint {
    font-style: italic;
}

.form-actions {
    margin-top: 1.5rem;
}

.design-output-info {
    margin-top: 2rem;
    padding: 1rem 1.5rem;
    background: var(--gray-100);
    border-radius: var(--radius);
}

.design-output-info h3 { margin-top: 0; }
.design-output-info ul { padding-left: 1.2rem; }

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    font-size: 0.85rem;
    margin-bottom: 1rem;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--gray-500);
    text-decoration: none;
}

.breadcrumb a:hover { color: var(--brand); }

/* ---------- Cart ---------- */

.cart-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cart-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
}

.cart-item-info { flex: 1; }
.cart-item-info h3 { margin: 0 0 0.25rem; font-size: 1rem; }

.cart-item-design,
.cart-item-units {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0;
}

.cart-item-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.5rem;
}

.param-badge {
    display: inline-block;
    background: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.75rem;
    padding: 0.15rem 0.5rem;
    border-radius: 3px;
}

.cart-item-price {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--brand);
    white-space: nowrap;
}

.cart-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}

.cart-total {
    font-size: 1.2rem;
    font-weight: 600;
}

.cart-total-amount {
    color: var(--brand);
    margin-left: 0.5rem;
}

.cart-actions {
    display: flex;
    gap: 0.75rem;
}

/* ---------- Orders ---------- */

.orders-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.order-card {
    display: block;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    text-decoration: none;
    transition: border-color 0.15s;
}

.order-card:hover { border-color: var(--brand); }

.order-card-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.order-id {
    font-weight: 600;
    color: var(--gray-900);
}

.order-date {
    font-size: 0.85rem;
    color: var(--gray-500);
}

.order-card-body {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.order-total {
    font-weight: 600;
    color: var(--brand);
}

/* ---------- Order detail ---------- */

.order-header {
    margin-bottom: 1.5rem;
}

.order-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.9rem;
}

.order-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.order-item-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.25rem;
}

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

.order-item-header h3 { margin: 0; }
.order-item-price { font-weight: 600; color: var(--brand); }

.order-item-design {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin: 0.25rem 0;
}

.order-item-params {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0.5rem 0;
}

.order-item-downloads {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.order-item-downloads h4 { margin: 0 0 0.5rem; font-size: 0.9rem; }

.download-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.download-btn {
    font-size: 0.8rem;
}

.order-item-pending {
    margin-top: 0.75rem;
}

/* ---------- Badges ---------- */

.badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
    border-radius: 3px;
}

.badge-success {
    background: var(--success-bg);
    color: var(--success);
}

.badge-pending {
    background: #fef3c7;
    color: #92400e;
}

/* ---------- Formats grid ---------- */

.formats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
}

.format-item {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 0.75rem;
    text-align: center;
    font-size: 0.85rem;
}

/* ---------- Empty state ---------- */

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--gray-500);
}

.empty-state p { margin-bottom: 1rem; }

/* ---------- Disclaimer ---------- */

.disclaimer {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

/* ---------- Catalog intro ---------- */

.catalog-intro {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.catalog-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.group-card-header {
    margin-bottom: 0.5rem;
    padding: 0.75rem 1rem 0;
}
