/*
 * Phronesis Africa Safaris — Cart Page Styles
 * File: cart-styles.css
 * Location: /wp-content/themes/hello-elementor-child/cart-styles.css
 *
 * Two-column layout: independently scrollable product list | sticky order summary
 */

/* ─────────────────────────────────────────────
   LAYOUT: Full-height two-column split
───────────────────────────────────────────── */

.phr-cart-layout {
    display: flex;
    align-items: flex-start;
    gap: 58px;
    max-width: 100%;
    margin: 0 auto;
    padding: 60px 24px 60px;
    min-height: calc(100vh - 160px);
}

/* Left column — scrollable */
.phr-cart-left {
    flex: 1 1 0;
    min-width: 0;
    /* Independent scroll */
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #d2b48c transparent;
}

.phr-cart-left::-webkit-scrollbar {
    width: 4px;
}
.phr-cart-left::-webkit-scrollbar-track {
    background: transparent;
}
.phr-cart-left::-webkit-scrollbar-thumb {
    background: #d2b48c;
    border-radius: 4px;
}

/* Right column — sticky, doesn't scroll with left */
.phr-cart-right {
    flex: 0 0 380px;
    width: 380px;
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 130px);
    overflow-y: auto;
    scrollbar-width: none;
}
.phr-cart-right::-webkit-scrollbar { display: none; }


/* ─────────────────────────────────────────────
   PAGE HEADER
───────────────────────────────────────────── */

.phr-cart-header {
    margin-bottom: 24px;
}

.phr-cart-title {
    font-size: 2rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 0 6px !important;
    line-height: 1.2 !important;
    border: none !important;
    padding: 0 !important;
}

.phr-cart-subtitle {
    font-size: 0.95rem;
    color: #777;
    margin: 0;
}


/* ─────────────────────────────────────────────
   PRODUCT CARDS
───────────────────────────────────────────── */

.phr-product-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.phr-product-card {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid #ede8e0;
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.phr-product-card:hover {
    box-shadow: 0 6px 20px rgba(139,69,19,0.1);
    transform: translateY(-1px);
}

/* Product image */
.phr-card-image {
    flex: 0 0 160px;
    width: 160px;
}

.phr-card-image img {
    width: 100% !important;
    height: 100% !important;
    min-height: 150px;
    object-fit: cover !important;
    display: block !important;
    border-radius: 0 !important;
}

.phr-card-image a {
    display: block;
    height: 100%;
}

/* Card content area */
.phr-card-content {
    flex: 1;
    padding: 18px 18px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 12px;
    min-width: 0;
}

/* Top row: name/tags + remove button */
.phr-card-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.phr-card-name {
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #1a1a1a !important;
    margin: 0 0 8px !important;
    line-height: 1.3 !important;
    padding: 0 !important;
    border: none !important;
}

.phr-card-name a {
    color: inherit !important;
    text-decoration: none !important;
}

.phr-card-name a:hover {
    color: #8b4513 !important;
}

/* Tags row */
.phr-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.phr-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 3px 9px;
    border-radius: 20px;
}

.phr-tag-duration {
    background: #fef3c7;
    color: #92400e;
}

.phr-tag-location {
    background: #dcfce7;
    color: #166534;
}

.phr-tag-date {
    background: #ede9fe;
    color: #5b21b6;
}

/* Remove button */
.phr-remove {
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #f8f4f0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important;
    transition: all 0.2s;
}

.phr-remove:hover {
    background: #fee2e2;
    color: #dc3545 !important;
}

/* Bottom row: guests + quantity + price */
.phr-card-bottom-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    border-top: 1px solid #f0ebe3;
    padding-top: 12px;
}

.phr-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.phr-field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Stepper control */
.phr-stepper {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1px solid #e0d9d0;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
    background: #faf8f5;
}

.phr-step-btn {
    width: 32px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: #555;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.phr-step-btn:hover {
    background: #ede8e0;
    color: #8b4513;
}

.phr-step-display {
    min-width: 36px;
    text-align: center;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1a1a1a;
    border-left: 1px solid #e0d9d0;
    border-right: 1px solid #e0d9d0;
    padding: 0 4px;
    line-height: 36px;
}

/* WooCommerce qty input override inside phr-qty-stepper */
.phr-qty-stepper .quantity {
    display: flex;
    align-items: center;
    border: 1px solid #e0d9d0;
    border-radius: 8px;
    overflow: hidden;
    height: 36px;
    background: #faf8f5;
}

.phr-qty-stepper .qty {
    width: 50px !important;
    height: 36px !important;
    border: none !important;
    border-radius: 0 !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    background: transparent !important;
    padding: 0 4px !important;
    box-shadow: none !important;
    outline: none !important;
    color: #1a1a1a !important;
}

/* Price group */
.phr-price-group {
    margin-left: auto;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.phr-unit-price {
    font-size: 0.85rem;
    color: #888;
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: flex-end;
}

.phr-unit-price small {
    font-size: 0.78rem;
    color: #aaa;
}

.phr-line-total {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1a1a1a;
}


/* ─────────────────────────────────────────────
   CART ACTIONS (coupon + update)
───────────────────────────────────────────── */

.phr-cart-actions {
    margin-top: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #ede8e0;
    border-radius: 12px;
    padding: 14px 18px;
    flex-wrap: wrap;
}

.phr-coupon-row {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.phr-coupon-input {
    padding: 9px 14px !important;
    border: 1px solid #e0d9d0 !important;
    border-radius: 8px !important;
    font-size: 0.9rem !important;
    color: #1a1a1a !important;
    width: 190px !important;
    outline: none !important;
    background: #faf8f5 !important;
    transition: border-color 0.2s !important;
    box-shadow: none !important;
}

.phr-coupon-input:focus {
    border-color: #8b4513 !important;
    box-shadow: 0 0 0 3px rgba(139,69,19,0.08) !important;
}

.phr-apply-btn {
    padding: 9px 18px !important;
    background: #8b4513 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

.phr-apply-btn:hover {
    background: #6b3d0f !important;
    color: #fff !important;
}

.phr-update-btn {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 9px 16px !important;
    background: transparent !important;
    color: #555 !important;
    border: 1px solid #e0d9d0 !important;
    border-radius: 8px !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.phr-update-btn:hover {
    border-color: #8b4513 !important;
    color: #8b4513 !important;
    background: #faf8f5 !important;
}


/* ─────────────────────────────────────────────
   ORDER SUMMARY BOX (right column)
───────────────────────────────────────────── */

.phr-summary-box {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #ede8e0;
    box-shadow: 0 4px 20px rgba(139,69,19,0.08);
    padding: 26px;
    overflow: hidden;
}

.phr-summary-title {
    font-size: 1.2rem !important;
    font-weight: 800 !important;
    color: #1a1a1a !important;
    margin: 0 0 20px !important;
    padding-bottom: 16px !important;
    border-bottom: 1px solid #ede8e0 !important;
    line-height: 1.2 !important;
}

/* Mini product rows in summary */
.phr-summary-items {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 16px;
}

.phr-summary-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.phr-summary-thumb {
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    overflow: hidden;
}

.phr-summary-thumb img {
    width: 52px !important;
    height: 52px !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 8px !important;
}

.phr-summary-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.phr-summary-name {
    font-size: 0.88rem;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.phr-summary-sub {
    font-size: 0.78rem;
    color: #888;
    display: block;
}

.phr-summary-line-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1a1a1a;
    white-space: nowrap;
    flex-shrink: 0;
}

.phr-summary-sep {
    height: 1px;
    background: #ede8e0;
    margin: 14px 0;
}


/* ─────────────────────────────────────────────
   TOTALS BLOCK
───────────────────────────────────────────── */

.phr-totals-block {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.phr-totals-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 0.9rem;
    color: #555;
    border-bottom: 1px solid #f5f0ea;
}

.phr-totals-line:last-child {
    border-bottom: none;
}

.phr-totals-discount span:last-child {
    color: #22c55e;
    font-weight: 600;
}

.phr-totals-grand {
    font-size: 1.05rem !important;
    font-weight: 700;
    color: #1a1a1a;
    padding-top: 12px;
    border-top: 2px solid #ede8e0;
    border-bottom: none;
}

.phr-grand-amount {
    font-size: 1.4rem !important;
    font-weight: 800;
    color: #8b4513;
}

.phr-grand-amount .woocommerce-Price-amount {
    color: #8b4513 !important;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
}


/* ─────────────────────────────────────────────
   CHECKOUT CTA BUTTON
───────────────────────────────────────────── */

.phr-checkout-cta {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 20px !important;
    padding: 16px !important;
    background: #8b4513 !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 10px !important;
    text-decoration: none !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s, transform 0.15s !important;
    box-sizing: border-box !important;
    letter-spacing: 0.01em !important;
}

.phr-checkout-cta:hover {
    background: #6b3d0f !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}


/* ─────────────────────────────────────────────
   TRUST SIGNALS
───────────────────────────────────────────── */

.phr-trust-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 16px 0 0 !important;
    border-top: 1px solid #ede8e0;
    padding-top: 16px !important;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.phr-trust-list li {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 0.8rem;
    color: #666;
}


/* ─────────────────────────────────────────────
   WOOCOMMERCE NOTICES
───────────────────────────────────────────── */

.phr-cart-layout .woocommerce-error,
.phr-cart-layout .woocommerce-message,
.phr-cart-layout .woocommerce-info {
    border-radius: 10px;
    padding: 12px 16px;
    list-style: none;
    margin-bottom: 16px;
}

.phr-cart-layout .woocommerce-message { background: #f0fdf4; border-left: 4px solid #22c55e; color: #166534; }
.phr-cart-layout .woocommerce-error   { background: #fef2f2; border-left: 4px solid #dc3545; color: #991b1b; }
.phr-cart-layout .woocommerce-info    { background: #eff6ff; border-left: 4px solid #3b82f6; color: #1d4ed8; }


/* ─────────────────────────────────────────────
   RESPONSIVE: tablet ≤ 900px (stack columns)
───────────────────────────────────────────── */

@media (max-width: 900px) {
    .phr-cart-layout {
        flex-direction: column;
        padding: 24px 16px 40px;
        min-height: auto;
    }

    .phr-cart-left {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .phr-cart-right {
        position: static;
        width: 100%;
        flex: none;
        max-height: none;
        overflow: visible;
    }
}


/* ─────────────────────────────────────────────
   RESPONSIVE: mobile ≤ 580px
───────────────────────────────────────────── */

@media (max-width: 580px) {
    .phr-cart-layout {
        padding: 16px 12px 32px;
        gap: 20px;
    }

    .phr-cart-title { font-size: 1.5rem !important; }

    /* Stack image above content on small screens */
    .phr-product-card {
        flex-direction: column;
    }

    .phr-card-image {
        flex: none;
        width: 100%;
        height: 160px;
    }

    .phr-card-image img {
        height: 160px !important;
        min-height: unset;
    }

    .phr-card-bottom-row {
        gap: 12px;
    }

    .phr-price-group {
        width: 100%;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }

    .phr-coupon-input {
        width: 100% !important;
    }

    .phr-cart-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .phr-coupon-row {
        flex-direction: column;
    }

    .phr-update-btn {
        justify-content: center !important;
    }

    .phr-summary-box {
        padding: 18px 14px;
    }
}