/**
 * Givova Official Greece - Custom Cart Styles
 * 
 * ΕΓΚΑΤΑΣΤΑΣΗ:
 * Επιλογή 1: Αντιγράψτε αυτό στο WordPress → Εμφάνιση → Προσαρμογή → Additional CSS
 * Επιλογή 2: Αντιγράψτε το αρχείο στο theme σας και κάντε enqueue στο functions.php
 */

/* ============================================
   FONTS
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&family=Inter:wght@300;400;500;600;700&display=swap');

/* ============================================
   VARIABLES
   ============================================ */
:root {
    --gc-bg: #ffffff;
    --gc-text: #141414;
    --gc-text-muted: #737373;
    --gc-primary: #ff6a00;
    --gc-primary-hover: #e85f00;
    --gc-primary-light: rgba(255, 106, 0, 0.08);
    --gc-primary-glow: rgba(255, 106, 0, 0.15);
    --gc-border: #e5e5e5;
    --gc-surface: #fafafa;
    --gc-surface-hover: #f5f5f5;
    --gc-radius: 12px;
    --gc-radius-sm: 8px;
    --gc-radius-full: 9999px;
    --gc-shadow: 0 1px 3px rgba(0,0,0,0.04), 0 1px 2px rgba(0,0,0,0.06);
    --gc-shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
    --gc-font-display: 'Space Grotesk', sans-serif;
    --gc-font-body: 'Inter', sans-serif;
    --gc-transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   WRAPPER
   ============================================ */
.givova-cart-wrapper {
    font-family: var(--gc-font-body);
    color: var(--gc-text);
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 20px 80px;
}

/* Hide default WooCommerce elements we're replacing */
.givova-cart-wrapper .cart_totals,
.givova-cart-wrapper .shop_table {
    display: none !important;
}

/* ============================================
   EMPTY CART
   ============================================ */
.givova-empty-cart {
    text-align: center;
    padding: 80px 20px;
}

.givova-empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gc-surface);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: var(--gc-text-muted);
}

.givova-empty-cart h2 {
    font-family: var(--gc-font-display);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 8px;
}

.givova-empty-cart p {
    color: var(--gc-text-muted);
    margin: 0 0 32px;
    font-size: 15px;
}

/* ============================================
   BUTTONS
   ============================================ */
.givova-btn-primary,
.givova-cart-wrapper .wc-proceed-to-checkout .checkout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--gc-primary) !important;
    color: #fff !important;
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 15px;
    padding: 14px 32px;
    border-radius: var(--gc-radius) !important;
    border: none !important;
    cursor: pointer;
    transition: all var(--gc-transition);
    text-decoration: none !important;
    box-shadow: 0 0 30px var(--gc-primary-glow), 0 0 60px rgba(255, 106, 0, 0.08);
    width: 100%;
    text-align: center;
    line-height: 1.4;
}

.givova-btn-primary:hover,
.givova-cart-wrapper .wc-proceed-to-checkout .checkout-button:hover {
    background: var(--gc-primary-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 0 40px var(--gc-primary-glow), 0 4px 16px rgba(255, 106, 0, 0.2);
}

.givova-btn-primary:active,
.givova-cart-wrapper .wc-proceed-to-checkout .checkout-button:active {
    transform: translateY(0);
}

.givova-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--gc-surface);
    color: var(--gc-text);
    font-family: var(--gc-font-body);
    font-weight: 500;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: var(--gc-radius-sm);
    border: 1px solid var(--gc-border);
    cursor: pointer;
    transition: all var(--gc-transition);
}

.givova-btn-secondary:hover {
    background: var(--gc-surface-hover);
    border-color: var(--gc-text-muted);
}

/* ============================================
   GRID LAYOUT
   ============================================ */
.givova-cart-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
}

@media (min-width: 1024px) {
    .givova-cart-grid {
        grid-template-columns: 3fr 2fr;
        gap: 40px;
    }
}

/* ============================================
   CART HEADER
   ============================================ */
.givova-cart-header h2 {
    font-family: var(--gc-font-display);
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 20px;
}

.givova-cart-count {
    color: var(--gc-text-muted);
    font-weight: 400;
    font-size: 20px;
}

/* ============================================
   CART ITEMS
   ============================================ */
.givova-cart-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.givova-cart-item {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    background: var(--gc-bg);
    transition: all var(--gc-transition);
    box-shadow: var(--gc-shadow);
}

.givova-cart-item:hover {
    border-color: rgba(255, 106, 0, 0.2);
    box-shadow: var(--gc-shadow-hover);
}

@media (min-width: 768px) {
    .givova-cart-item {
        gap: 24px;
        padding: 20px 24px;
    }
}

/* Item Image */
.givova-item-image {
    position: relative;
    width: 96px;
    height: 96px;
    border-radius: var(--gc-radius-sm);
    overflow: hidden;
    background: var(--gc-surface);
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .givova-item-image {
        width: 128px;
        height: 128px;
    }
}

.givova-item-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.givova-cart-item:hover .givova-item-image img {
    transform: scale(1.05);
}

.givova-sale-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--gc-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: var(--gc-radius-full);
    line-height: 1.4;
}

/* Item Details */
.givova-item-details {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.givova-item-name {
    font-family: var(--gc-font-display);
    font-weight: 600;
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
}

@media (min-width: 768px) {
    .givova-item-name {
        font-size: 15px;
    }
}

.givova-item-name a {
    color: var(--gc-text);
    text-decoration: none;
}

.givova-item-name a:hover {
    color: var(--gc-primary);
}

.givova-item-variant {
    color: var(--gc-text-muted);
    font-size: 12px;
    margin: 4px 0 0;
}

.givova-item-bottom {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-top: 12px;
    gap: 12px;
}

/* Quantity */
.givova-qty-wrapper {
    display: flex;
    align-items: center;
}

.givova-qty-wrapper .quantity {
    display: flex;
    align-items: center;
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius-full);
    overflow: hidden;
    background: var(--gc-surface);
}

.givova-qty-wrapper .quantity input.qty {
    width: 40px;
    height: 36px;
    border: none !important;
    background: transparent;
    text-align: center;
    font-family: var(--gc-font-display);
    font-weight: 600;
    font-size: 14px;
    color: var(--gc-text);
    padding: 0;
    margin: 0;
    -moz-appearance: textfield;
    appearance: textfield;
}

.givova-qty-wrapper .quantity input.qty::-webkit-outer-spin-button,
.givova-qty-wrapper .quantity input.qty::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Price + Remove */
.givova-item-price-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.givova-remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    color: var(--gc-text-muted);
    opacity: 0;
    transition: all var(--gc-transition);
    text-decoration: none !important;
}

.givova-cart-item:hover .givova-remove-btn {
    opacity: 1;
}

.givova-remove-btn:hover {
    color: #ef4444 !important;
    background: rgba(239, 68, 68, 0.1);
}

.givova-item-price {
    text-align: right;
}

.givova-price-original {
    display: block;
    font-size: 12px;
    color: var(--gc-text-muted);
    text-decoration: line-through;
    text-decoration-color: rgba(255, 106, 0, 0.4);
}

.givova-price-original .woocommerce-Price-amount {
    font-size: inherit;
    color: inherit;
}

.givova-price-current {
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--gc-text);
}

.givova-price-current .woocommerce-Price-amount {
    font-size: inherit;
    font-weight: inherit;
}

/* ============================================
   UPDATE CART
   ============================================ */
.givova-update-cart {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
}

/* ============================================
   SUMMARY
   ============================================ */
.givova-cart-summary {
    background: var(--gc-surface);
    border: 1px solid var(--gc-border);
    border-radius: 16px;
    padding: 28px;
    position: sticky;
    top: 32px;
}

@media (min-width: 768px) {
    .givova-cart-summary {
        padding: 32px;
    }
}

.givova-cart-summary h2 {
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 20px;
    margin: 0 0 24px;
}

/* Coupon */
.givova-coupon {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.givova-coupon-input {
    position: relative;
    flex: 1;
}

.givova-coupon-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gc-text-muted);
    pointer-events: none;
}

.givova-coupon-field {
    width: 100%;
    background: var(--gc-bg);
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius-sm);
    padding: 10px 12px 10px 34px;
    font-size: 13px;
    font-family: var(--gc-font-body);
    color: var(--gc-text);
    transition: all var(--gc-transition);
    outline: none;
}

.givova-coupon-field:focus {
    border-color: var(--gc-primary);
    box-shadow: 0 0 0 3px var(--gc-primary-light);
}

.givova-coupon-field::placeholder {
    color: var(--gc-text-muted);
}

.givova-btn-coupon {
    background: var(--gc-bg);
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--gc-transition);
    color: var(--gc-text);
    white-space: nowrap;
}

.givova-btn-coupon:hover {
    background: var(--gc-surface-hover);
    border-color: var(--gc-text-muted);
}

/* Summary Lines */
.givova-summary-lines {
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 14px;
}

.givova-summary-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gc-text-muted);
}

.givova-summary-line .woocommerce-Price-amount {
    color: var(--gc-text-muted);
}

.givova-discount {
    color: var(--gc-primary) !important;
}

.givova-discount .woocommerce-Price-amount {
    color: var(--gc-primary) !important;
}

.givova-summary-divider {
    height: 1px;
    background: var(--gc-border);
    margin: 8px 0;
}

.givova-total {
    color: var(--gc-text) !important;
}

.givova-total span:first-child {
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 18px;
}

.givova-total span:last-child,
.givova-total .woocommerce-Price-amount {
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 24px;
    color: var(--gc-text) !important;
    background: linear-gradient(135deg, var(--gc-primary), #ffa94d);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Checkout button wrapper */
.givova-checkout-btn-wrapper {
    margin-top: 24px;
}

.givova-checkout-btn-wrapper .wc-proceed-to-checkout {
    padding: 0;
}

/* ============================================
   TRUST BADGES
   ============================================ */
.givova-trust-badges {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 24px;
}

.givova-trust-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
}

.givova-trust-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--gc-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gc-primary);
    border: 1px solid var(--gc-border);
}

.givova-trust-badge span {
    font-size: 10px;
    color: var(--gc-text-muted);
    line-height: 1.3;
}

/* ============================================
   SUGGESTIONS
   ============================================ */
.givova-suggestions {
    margin-top: 40px;
}

.givova-suggestions h3 {
    font-family: var(--gc-font-display);
    font-weight: 600;
    font-size: 18px;
    margin: 0 0 16px;
    color: var(--gc-text-muted);
}

.givova-suggestions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 600px) {
    .givova-suggestions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.givova-suggestion-card {
    border: 1px solid var(--gc-border);
    border-radius: var(--gc-radius);
    overflow: hidden;
    text-decoration: none !important;
    color: var(--gc-text);
    transition: all var(--gc-transition);
    box-shadow: var(--gc-shadow);
}

.givova-suggestion-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--gc-shadow-hover);
    border-color: rgba(255, 106, 0, 0.15);
}

.givova-suggestion-image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--gc-surface);
}

.givova-suggestion-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.givova-suggestion-card:hover .givova-suggestion-image img {
    transform: scale(1.05);
}

.givova-suggestion-info {
    padding: 12px;
}

.givova-suggestion-name {
    font-size: 12px;
    font-weight: 500;
    margin: 0 0 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gc-text);
}

.givova-suggestion-price {
    font-family: var(--gc-font-display);
    font-weight: 700;
    font-size: 14px;
}

/* ============================================
   WooCommerce SHIPPING OVERRIDES
   ============================================ */
.givova-cart-summary .woocommerce-shipping-methods {
    list-style: none;
    padding: 0;
    margin: 0;
}

.givova-cart-summary .woocommerce-shipping-methods li {
    margin-bottom: 4px;
}

.givova-cart-summary .woocommerce-shipping-methods label {
    font-size: 13px;
    color: var(--gc-text-muted);
}

.givova-cart-summary .shipping-calculator-button {
    font-size: 12px;
    color: var(--gc-primary);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 767px) {
    .givova-cart-wrapper {
        padding: 12px 12px 60px;
    }

    .givova-cart-item {
        gap: 12px;
        padding: 12px;
    }

    .givova-cart-summary {
        padding: 20px;
    }

    .givova-item-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .givova-item-price-actions {
        width: 100%;
        justify-content: space-between;
    }

    .givova-remove-btn {
        opacity: 1;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes givova-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.givova-cart-item {
    animation: givova-fadeInUp 0.4s ease both;
}

.givova-cart-item:nth-child(2) { animation-delay: 0.08s; }
.givova-cart-item:nth-child(3) { animation-delay: 0.16s; }
.givova-cart-item:nth-child(4) { animation-delay: 0.24s; }
.givova-cart-item:nth-child(5) { animation-delay: 0.32s; }

.givova-cart-summary {
    animation: givova-fadeInUp 0.5s ease 0.2s both;
}
