/*
THE GUN DOCK - PROFESSIONAL SHOPPING CART
Modern e-commerce cart experience
*/

/* ============================================
   CART WRAPPER & LAYOUT
   ============================================ */

.tgd-cart-wrapper {
    background: #f5f5f5;
    min-height: 60vh;
    padding: 2rem 0;
}

.tgd-cart-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #2d2d2d;
}

.tgd-cart-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
}

.tgd-cart-count {
    font-size: 1.125rem;
    color: #666;
    margin: 0;
}

/* ============================================
   CART ITEMS - CARD LAYOUT
   ============================================ */

.tgd-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.tgd-cart-item {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    display: grid;
    grid-template-columns: 120px 1fr auto auto auto;
    gap: 1.5rem;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

.tgd-cart-item:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Product Image */
.tgd-cart-item-image {
    width: 120px;
    height: 120px;
    background: #f9f9f9;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tgd-cart-item-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Product Details */
.tgd-cart-item-details {
    flex: 1;
    min-width: 0;
}

.tgd-cart-item-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 0.5rem 0;
    line-height: 1.4;
}

.tgd-cart-item-name a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tgd-cart-item-name a:hover {
    color: #ff4757;
}

.tgd-cart-item-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.tgd-cart-sku,
.tgd-cart-stock {
    font-size: 0.875rem;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-weight: 500;
}

.tgd-cart-sku {
    background: #e8e8e8;
    color: #555;
}

.tgd-cart-stock.in-stock {
    background: #d4edda;
    color: #155724;
}

.tgd-cart-stock.out-of-stock {
    background: #f8d7da;
    color: #721c24;
}

/* Quantity Controls */
.tgd-cart-item-quantity {
    text-align: center;
}

.tgd-cart-item-quantity label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 0.5rem;
}

.tgd-quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 0.5rem;
}

.tgd-qty-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: #2d2d2d;
    color: #ffffff;
    border-radius: 6px;
    font-size: 1.25rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tgd-qty-btn:hover {
    background: #ff4757;
    transform: scale(1.1);
}

.tgd-quantity-controls input[type="number"] {
    width: 60px;
    height: 36px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    -moz-appearance: textfield;
}

.tgd-quantity-controls input[type="number"]::-webkit-outer-spin-button,
.tgd-quantity-controls input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tgd-quantity-controls input[type="number"]:focus {
    outline: none;
    border-color: #ff4757;
}

/* Price Display */
.tgd-cart-item-price {
    text-align: right;
    min-width: 120px;
}

.tgd-cart-unit-price {
    font-size: 0.875rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.tgd-cart-subtotal {
    font-size: 1.5rem;
    font-weight: 700;
    color: #ff4757;
}

.tgd-cart-subtotal .amount {
    color: #ff4757;
}

/* Remove Button */
.tgd-cart-item-remove {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.tgd-remove-item {
    width: 32px;
    height: 32px;
    background: #f5f5f5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s ease;
    color: #999;
    font-size: 1.5rem;
    line-height: 1;
}

.tgd-remove-item:hover {
    background: #ff4757;
    color: #ffffff;
    transform: rotate(90deg) scale(1.1);
}

/* ============================================
   CART ACTIONS
   ============================================ */

.tgd-cart-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.tgd-continue-shopping {
    background: transparent;
    color: #2d2d2d;
    border: 2px solid #2d2d2d;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: inline-block;
}

.tgd-continue-shopping:hover {
    background: #2d2d2d;
    color: #ffffff;
    transform: translateX(-4px);
}

.tgd-update-cart {
    background: #2d2d2d;
    color: #ffffff;
    border: none;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tgd-update-cart:hover {
    background: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ============================================
   CART SUMMARY SIDEBAR
   ============================================ */

.tgd-cart-summary {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 2rem;
}

.tgd-summary-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 1.5rem 0;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

/* Cart Totals Styling */
.cart_totals {
    margin-bottom: 2rem;
}

.cart_totals h2 {
    display: none;
}

.cart_totals table {
    width: 100%;
    border: none;
}

.cart_totals th,
.cart_totals td {
    padding: 1rem 0;
    border-top: 1px solid #f0f0f0;
    text-align: left;
}

.cart_totals th {
    font-weight: 600;
    color: #666;
    font-size: 1rem;
}

.cart_totals td {
    text-align: right;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 1.125rem;
}

.cart_totals .order-total th {
    font-size: 1.25rem;
    color: #1a1a1a;
    padding-top: 1.5rem;
}

.cart_totals .order-total td {
    font-size: 1.75rem;
    font-weight: 700;
    color: #ff4757;
    padding-top: 1.5rem;
}

.cart_totals .order-total td .amount {
    color: #ff4757;
}

/* Checkout Button */
.wc-proceed-to-checkout {
    margin-top: 1.5rem;
}

.wc-proceed-to-checkout .checkout-button {
    width: 100%;
    background: #ff4757;
    color: #ffffff;
    border: none;
    padding: 1.25rem 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: block;
}

.wc-proceed-to-checkout .checkout-button:hover {
    background: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* Trust Badges */
.tgd-trust-badges {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid #f0f0f0;
}

.tgd-badge {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: #2d2d2d;
}

.tgd-badge svg {
    color: #28a745;
    flex-shrink: 0;
}

/* ============================================
   EMPTY CART
   ============================================ */

.cart-empty {
    background: #ffffff;
    border-radius: 12px;
    padding: 4rem 2rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.cart-empty::before {
    content: "🛒";
    font-size: 5rem;
    display: block;
    margin-bottom: 1rem;
    opacity: 0.3;
}

.return-to-shop {
    margin-top: 2rem;
}

.return-to-shop .button {
    background: #ff4757;
    color: #ffffff;
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.return-to-shop .button:hover {
    background: #d32f2f;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 991px) {
    .tgd-cart-item {
        grid-template-columns: 100px 1fr;
        gap: 1rem;
    }

    .tgd-cart-item-image {
        width: 100px;
        height: 100px;
    }

    .tgd-cart-item-details {
        grid-column: 2;
    }

    .tgd-cart-item-quantity {
        grid-column: 1;
        text-align: left;
    }

    .tgd-cart-item-price {
        grid-column: 2;
        text-align: right;
    }

    .tgd-cart-summary {
        margin-top: 2rem;
        position: static;
    }

    .tgd-cart-actions {
        flex-direction: column;
        gap: 1rem;
    }

    .tgd-continue-shopping,
    .tgd-update-cart {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 576px) {
    .tgd-cart-title {
        font-size: 1.75rem;
    }

    .tgd-cart-item {
        padding: 1rem;
        grid-template-columns: 80px 1fr;
    }

    .tgd-cart-item-image {
        width: 80px;
        height: 80px;
    }

    .tgd-cart-item-name {
        font-size: 1rem;
    }

    .tgd-cart-subtotal {
        font-size: 1.25rem;
    }
}

/* ============================================
   COUPON FORM STYLING
   ============================================ */

.coupon {
    display: flex;
    gap: 0.5rem;
    margin: 1.5rem 0;
}

.coupon input[type="text"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 1rem;
}

.coupon input[type="text"]:focus {
    outline: none;
    border-color: #ff4757;
}

.coupon button {
    background: #2d2d2d;
    color: #ffffff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.coupon button:hover {
    background: #1a1a1a;
}
