/* Add styles here */

/* Navigation Actions */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px; /* Space between Login and Cart */
}

/* Cart Link Styling (for badge positioning) */
.cart-link {
    position: relative;
    display: inline-flex; /* Use inline-flex to contain text and badge */
    align-items: center;
    text-decoration: none; /* Remove underline */
    color: inherit; /* Inherit color from parent */
}

/* Cart Badge Styling */
.badge {
    position: absolute;
    top: -8px;    /* 위로 8px 올림 */
    right: -12px; /* 오른쪽으로 12px 이동 (글자 바깥으로 뺌) */
    background-color: #ff0000;
    color: white;
    border-radius: 50%;
    padding: 4px 6px;
    font-size: 10px;
    font-weight: bold;
    min-width: 14px; /* Ensure minimum width for single digit */
    height: 14px;
    display: flex; /* 내용물 중앙 정렬 */
    justify-content: center;
    align-items: center;
    z-index: 10;
}


/* Login Modal Styles */
dialog#login-modal[open] {
    display: flex;
    flex-direction: column;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: none;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 0 20px rgba(0,0,0,0.3);
    position: fixed;
    background-color: #fff;
}

dialog#login-modal::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

/* Input field styles */
dialog#login-modal input[type="text"],
dialog#login-modal input[type="password"] {
    width: 100%;
    margin-bottom: 10px;
    padding: 10px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* Input field focus effect */
dialog#login-modal input[type="text"]:focus,
dialog#login-modal input[type="password"]:focus {
    border-color: #3b82f6; /* Blue border on focus */
    box-shadow: 0 0 0 1px #3b82f6; /* Subtle blue glow on focus */
    outline: none;
}

/* Button Group styling */
.btn-group {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    width: 100%;
    justify-content: center;
}

.btn-group button {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    flex-grow: 1;
}

#login-submit {
    background-color: #3b82f6; /* Blue */
    color: white;
}

#modal-close-btn {
    background-color: #e2e8f0; /* Light gray */
    color: #333;
}

/* Product Detail Page Styles */
.product-detail-container {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    gap: 40px; /* Space between columns */
    padding: 40px 0; /* Vertical padding for content */
}

.product-image-section {
    flex: 1; /* Take up remaining space */
    min-width: 300px; /* Minimum width before wrapping */
}

.product-detail-image {
    width: 100%;
    height: auto;
    display: block; /* Remove extra space below image */
    border-radius: 8px; /* Consistent rounded corners */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.product-info-section {
    flex: 1; /* Take up remaining space */
    min-width: 300px; /* Minimum width before wrapping */
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically if space allows */
}

.product-name {
    font-size: 2.5rem; /* H1 size */
    font-weight: 700;
    color: #333;
    margin-bottom: 15px;
}

.product-price {
    font-size: 1.8rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 25px;
}

.product-description {
    font-size: 1rem;
    line-height: 1.6;
    color: #666;
    margin-bottom: 30px;
}

.size-selector {
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.size-selector label {
    font-weight: 600;
    color: #333;
}

.size-selector select {
    padding: 10px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #fff;
    cursor: pointer;
    font-size: 1rem;
    appearance: none; /* Remove default select arrow */
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%20viewBox%3D%220%200%20292.4%20292.4%22%3E%3Cpath%20fill%3D%22%23666%22%20d%3D%22M287%20197.3l-130.6-130.6c-4.7-4.7-12.3-4.7-17%200l-130.6%20130.6c-4.7%204.7-4.7%2012.3%200%2017l15.3%2015.3c4.7%204.7%2012.3%204.7%2017%200l97.3-97.3l97.3%2097.3c4.7%204.7%2012.3%204.7%2017%200l15.3-15.3c4.7-4.7%204.7-12.3%200-17z%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px top 50%;
    background-size: 12px;
}

.product-actions {
    display: flex;
    gap: 15px;
}

.add-to-cart-btn, .buy-now-btn {
    flex: 1;
    padding: 15px 20px;
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.add-to-cart-btn {
    background-color: #4CAF50; /* Green */
    color: white;
}

.add-to-cart-btn:hover {
    background-color: #45a049;
    box-shadow: 0 4px 10px rgba(0, 128, 0, 0.2);
}

.buy-now-btn {
    background-color: #008CBA; /* Blue */
    color: white;
}

.buy-now-btn:hover {
    background-color: #007ba7;
    box-shadow: 0 4px 10px rgba(0, 128, 128, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .product-detail-container {
        flex-direction: column;
        gap: 20px;
    }
    .product-info-section {
        padding: 0; /* Remove padding on smaller screens if columns stack */
    }
}