/* Витрина подарочных карт (gift_cards.php) */

.gift-shop-page .main-content {
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: calc(96px + env(safe-area-inset-bottom));
}

.gift-shop-hero {
    position: relative;
    border-radius: 18px;
    padding: 22px 20px 20px;
    margin-bottom: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.16) 0%, rgba(255, 107, 157, 0.1) 45%, rgba(74, 111, 255, 0.08) 100%);
    border: 1px solid rgba(255, 152, 0, 0.28);
}

.gift-shop-hero::before {
    content: '';
    position: absolute;
    top: -40px;
    right: -40px;
    width: 140px;
    height: 140px;
    background: radial-gradient(circle, rgba(255, 193, 7, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.gift-shop-hero-inner {
    position: relative;
    z-index: 1;
}

.gift-shop-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #e65100;
    background: rgba(255, 255, 255, 0.65);
    padding: 6px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
}

.gift-shop-hero h1 {
    font-size: 1.45rem;
    font-weight: 800;
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.gift-shop-hero-lead {
    font-size: 14px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0;
}

.gift-master-card {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-bottom: 20px;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

a.gift-master-card:hover {
    border-color: rgba(255, 152, 0, 0.45);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.gift-master-avatar {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--accent-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 18px;
    overflow: hidden;
    flex-shrink: 0;
    border: 2px solid rgba(255, 152, 0, 0.35);
}

.gift-master-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gift-master-meta {
    flex: 1;
    min-width: 0;
}

.gift-master-name {
    font-weight: 700;
    font-size: 16px;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.gift-master-sub {
    font-size: 12px;
    color: var(--text-tertiary);
    margin: 0;
    line-height: 1.35;
}

.gift-master-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #ffb300;
    margin-top: 6px;
}

.gift-master-card .gift-master-chevron {
    color: var(--text-tertiary);
    font-size: 14px;
}

.gift-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 22px;
}

.gift-step {
    text-align: center;
    padding: 12px 8px;
    background: var(--bg-surface);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.gift-step-num {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800, #ff6b9d);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
}

.gift-step-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.3;
    margin: 0;
}

.gift-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.gift-toolbar label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-tertiary);
    margin: 0;
}

.gift-sort-select,
.gift-search-input {
    flex: 1 1 140px;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 14px;
}

.gift-count-pill {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 8px 12px;
    background: var(--bg-surface);
    border-radius: 999px;
    border: 1px solid var(--border-color);
}

.gift-auth-card {
    padding: 16px 18px;
    border-radius: 14px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
}

.gift-auth-card.warn {
    border-color: rgba(255, 152, 0, 0.45);
    background: rgba(255, 152, 0, 0.08);
}

.gift-auth-card.ok {
    border-color: rgba(0, 214, 143, 0.35);
    background: rgba(0, 214, 143, 0.06);
}

.gift-auth-card p {
    margin: 0 0 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}

.gift-auth-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.gift-product-list {
 display: flex;
 flex-direction: column;
 gap: 14px;
}

.gift-product-card {
    position: relative;
    border-radius: 18px;
    padding: 18px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.gift-product-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #ff9800, #ff6b9d, #4a6fff);
    opacity: 0.85;
}

.gift-product-card:hover {
    border-color: rgba(255, 152, 0, 0.4);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.gift-product-ribbon {
    position: absolute;
    top: 14px;
    right: -32px;
    transform: rotate(42deg);
    background: linear-gradient(90deg, #ff6b9d, #ff9800);
    color: #fff;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 36px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gift-product-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 8px;
    padding-right: 8px;
}

.gift-product-title {
    font-size: 17px;
    font-weight: 800;
    margin: 0;
    color: var(--text-primary);
    line-height: 1.25;
}

.gift-product-price {
    font-size: 22px;
    font-weight: 900;
    color: #00b368;
    white-space: nowrap;
}

.gift-product-promo {
    font-size: 12px;
    font-weight: 700;
    color: #e65100;
    margin-bottom: 8px;
}

.gift-product-desc {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0 0 6px;
}

.gift-product-desc.collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gift-readmore {
    display: inline;
    background: none;
    border: none;
    padding: 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-primary);
    cursor: pointer;
    margin-bottom: 12px;
}

.gift-buy-btn {
    width: 100%;
    margin-top: 4px;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.gift-buy-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.gift-buy-btn .fa-spinner {
    animation: gift-spin 0.8s linear infinite;
}

@keyframes gift-spin {
    to { transform: rotate(360deg); }
}

.gift-faq {
    margin-top: 28px;
}

.gift-faq h2 {
    font-size: 16px;
    font-weight: 800;
    margin: 0 0 12px;
}

.gift-faq details {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 8px;
    background: var(--bg-card);
    overflow: hidden;
}

.gift-faq summary {
    padding: 14px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.gift-faq summary::-webkit-details-marker {
    display: none;
}

.gift-faq summary::after {
    content: '+';
    font-weight: 800;
    color: var(--text-tertiary);
}

.gift-faq details[open] summary::after {
    content: '−';
}

.gift-faq .gift-faq-body {
    padding: 0 16px 14px;
    font-size: 13px;
    line-height: 1.55;
    color: var(--text-secondary);
}

.gift-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.gift-empty i {
    font-size: 48px;
    margin-bottom: 14px;
    opacity: 0.3;
    display: block;
}

#err.gift-err {
    padding: 12px 14px;
    border-radius: 10px;
    background: rgba(255, 61, 113, 0.12);
    border: 1px solid rgba(255, 61, 113, 0.3);
    color: var(--danger);
    margin-bottom: 16px;
    font-size: 14px;
}

@media (max-width: 400px) {
    .gift-steps {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 500px) {
    .gift-steps {
        gap: 12px;
    }
}
